Unfortunately, it's become very normalized for parents to give kids melatonin on a regular basis, and to take it themselves. With kids, it seems to largely be done for the convenience of the parents, so they can have an early evening to themselves, or a relaxing afternoon while the kids nap (this is particularly bad...it shouldn't be used mid-day; I'm sure the kids are being woken up for dinner before the melatonin has worn off, which means these parents are training these kids' bodies to fight the effects of melatonin, and it will come back to bite them), but it just pays no attention to the long-term impacts...
Melatonin is a hormone, it is indeed produced by the body, and I don't know of any other hormone that we are so willingly eager to fiddle around with. Hormones are very tricky things, and it's why hormone therapies are generally prescription-only. The very idea of people self-dosing with any hormone at all gives me the heebie-jeebies. Melatonin is indeed the sleep hormone, the one and only sleep hormone that I'm aware of (it's entirely possible there's something I'm unaware of, but...even then, it would all still be part of a carefully-balanced system), and if you screw around with that and your body develops a resistance to it? You're just plain out of luck. I hope you enjoy not sleeping. My mom's been taking melatonin fairly regularly lately, and now, practically any night that she doesn't take it, she wakes up at 3 or 4 AM.
An actual inability to sleep, in an adult or a child, is a symptom of something, and just downing melatonin isn't going to fix that. It's a band-aid, and isn't a long-term solution.