Hello Amit Negi,
Using transforms in CSS helps to modify the existing elements in the DOM (Document Object Model). This means that you don’t need to remove and/or add elements in the DOM, you can just use the existing elements to achieve the desired results. If we’ll add/remove elements in the DOM, that will/might change the document flow/layout.
For example — if you want to make an element traverse along X-axis, you don’t need multiple elements showing and hiding at different time intervals, what you can do is just use the existing element to change its coordinates along the x-axis.
I hope you I am able to make things a bit clear.
Thank you for reaching out!
Courtesy: Aditya Tyagi