The tradition of birthday cakes dates back to ancient civilizations, where cakes were offered to gods during celebrations. Over time, it evolved into the practice of celebrating birthdays with a special cake, with candles symbolizing the person's age.