There is no one perfect oven that will cook every recipe perfectly. However, professional ovens are usually flexible enough that you can bake most things with minimal reconfiguration or through settings changes. So the biggest difference is simply that the oven is better than most home ovens, but even if you had such an oven you would need to understand how to use it, and that would change based on the recipe and your desired outcome.
A widely-suggested tip is that one should (swap and) rotate their baking tray(s) half-way through a bake (to promote even cooking).
This is largely due to older non convection home ovens having very uneven heating. If you rotate your trays during baking then they will bake more evenly if your oven has this type of issue.
If you have a nicer oven and learn how to use the convection feature then this may not be necessary to obtain good results. Even with a good oven, though, rotation can improve results, and as such even professionals will rotate their products during baking.
I was wondering how professional bakeries (read: not factories, actual bakeries) handle this operation when mass producing things like muffins, cookies, etc.?
They will use an oven that either doesn't require rotating for their recipe, or that rotates the items automatically. As you've identified this would be time consuming without specialized ovens to handle this for you. Opening an oven for several minutes to rotate 10-20 trays would probably do more harm than good to the final product, so once your production exceeds 5-10 trays at a time, you should consider moving to an oven that makes it quick, or does it automatically for you.
I'm under the impression a real bakery won't be using 1, but maybe 4+ trays of goods in one particular bake. That seems like a lot of tray (swapping and) rotating...
A professional bakery that isn't using a conveyor system will often use standard baking racks which have the ability to hold many trays, and the larger ovens accept a tall rack on wheels.
If the oven supports automatic rotation and the baker turns it on then it rotates the entire rack during baking. If not, and the rack requires rotation, it's a simple matter of opening the door, pulling the whole rack out, rotating it, and pushing it back in. Turning several trays at once isn't a problem with this type of baking rack.
Here's an example of a smaller oven with a rotating tray holder:
Here's an example of a larger oven that accepts an entire rolling rack: