It's a once a year reminder that people are happy that you exist.
Sometimes children can feel like maybe their existence makes their parents lives worse, so it is important for them to be reassured that that is not the case (even if it is).
It's also just a fun thing to do. For some kids it's one of the few times per year they're allowed to go wild with sweets, so it's something they look forward to.
> If you want something just buy it.
Kids also often do not yet manage their own finances, so they don't have the freedom to just buy the things they want.
Or make it, as was my case growing up, when my parents couldn't afford what I wanted anyway.
Money isn't an issue now, so gifts are definitely annoying. I'm not going to wait a month to maybe get the correct drill bit/appliance/etc. I'll just get the correct one now, and play a game or go into town with me on/near-ish my birthday