What is the origin of the birthday cake superstition?

It appears to be related to the Greek goddess Artemis, whose birthday was celebrated with moon-shaped honey cakes topped with candles.

One possible reason is because the ancient Greeks used to take cakes (round to represent the full moon) to the temple of their goddess of the moon, Artemis. The Greeks are said to have placed candles on the cake to make it look as if it was glowing like the moon

Another explanation is the birthday cake started in Germany. Geburtstagorten was a type of cake that is said to have been used to celebrate birthdays.