It is a long story but the idea to make a hole at the centre of doughnuts was to cook them evenly. If I go by the story then in 19th century Captain Hanson Gregory actually invented the doughnut hole while he was on a lime-trading ship.
According to records, Gregory wasn’t happy with the consistency of the fried cakes served on the ship, as they used to be partially uncooked and greasy at the centre. So, he suggested making a hole at the centre of fried cakes so that the dish could be evenly cooked.
Surprisingly, his idea worked and when the doughnuts with holes at the centre were fried, they used to turn up fine around the edges and also evenly cooked in the middle.