Why doesn't a commutator cause the rotation to reverse periodically or stop?
A normal DC motor has 3 poles instead of just 2. This solves a couple of problems:
the commutator doesn’t short out as it crosses from one pole to the other.
the energized poles are always phased with the field magnets such that they never get in a place where they’re ‘stuck’.
This Quora link has an animated illustration that shows the idea: https://www.quora.com/Why-do-most-brushed-DC-motors-have-3-armatures-and-not-2
And to save you the trouble of following the link, here are the ani-GIFs:
Wow, party like it's Internet 1999 again!
Inertia carries it through. I also think the brushes are arranged so only one slip ring can touch the brush at a time, otherwise you would get a short-circuit twice per rotation. Despite the image showing both slip rings touching the brush, the waveforms say different.
The motors like the one in your picture bear a lot of resemblance with primitive combustion engines. They require a push to start, and will keep rotating in the direction in which they have been pushed. They can only run smoothly if the rotor has sufficient inertia, if not, a flywheel must be added to increase it. And finally, they cannot run reliably at arbitrarily low RPM.
Such motors are good for illustrative purposes, but are currently never used in practice.