Why does a microwave rotate the food being cooked? And is there ever a time when it shouldn't rotate? Most microwaves I've used have a plate at the bottom that rotates when the microwave is running. I presume that rotating helps more evenly heat the food.

Interestingly, my microwave rotates by default but has a button you can press to disable the rotation. Under what circumstances or scenarios would you want to stop the microwave from rotating the food?
Microwave ovens have a turntable because the microwaves themselves form what are known as 'standing waves'. This means there are essentially static columns of microwave energy inside the cabinet itself.

You can see this for yourself - spread a tray or plate with grated cheese, take the turntable out (or press that button), and zap it for a couple of minutes. You should see bands of melted cheese interleaved with unmelted cheese. Thus, the food is rotated to ensure even heating.