Sugar was not easy to attain during the Middle Ages, so bakers had to turn to carrots for sweetness, inspiring desserts like sweet carrot pudding, which consisted of eggs, flour, spices, and boiled or steamed carrots. While some historians question these origins, there’s no denying the clear connection between the sweet carrot puddings of the Middle Ages and the modern carrot cake.