It is just a pattern the React team has adopted to make the framework more robust and easier to maintain.
Advantages
The transactions that happen during a React render handle many other things such as maintaining the window’s scroll position, and a lot of other necessary book keeping.
Another benefit of the transaction pattern is it becomes easy to store the state of the browser, do a whole bunch of work, then restore the state at the very end, rather than having to continually worry about accidentally scrolling the window or clearing an input selection.
Advantages