Why do office chairs rotate when pushed/pulled out?
The problem is, that the bearings are not perfect. Especially the ones that are used to turn the "feet" of the chair. Those bearings are under a quite heavy load, and they are not designed to turn without friction.
As such, your chair's feet always want to remain in the same position as they are, and that is usually not exactly the direction into which you want to move your chair. Frequently, you cannot move into any direction without turning some feet.
So, when you push your chair back, the feet of the chairs basically hold a contest on who's the first to turn. Now, like all the feet, the ones that remain in position relative to the chair's base, are generally not aligned with your movement either, and they provide the chair's base with some rotating force.
You can make the test of aligning all five feet straight to the back, and then slowly drawing the chair back. You'll see that you'll be able to move the chair for some distance without the base turning. However, once the imperfections of the setup amplify, one or more feet become significantly out of direction, and that's when the chair's base will start turning.