The answer – both possible explanations, that is – is much more practical than you might expect. Donuts start their short lives out as mounds of dough that are separated, manipulated, and then fried in hot oil. The problem with cooking a patty of dough is that it’s hard to cook evenly. By the time you get the middle cooked all the way through, the edges are too crispy.
Legend has it that someone once got so tired of biting into raw dough in their fried cake that they resorted to punching a hole through it and cooking it evenly in a ring shape. And thus, the donut was born.
You might also subscribe to the theory that bakeries used to put products like bagels on sticks or strings, and donut makers wanted to do that, too. Hold on. Why don’t we put stacks of donuts on sticks instead of into boxes? That feels less fun.