Unfortunately there are a lot of kids living on the street in scotland. It really surprised me the first time I went to Edinburgh, how many young people there were sitting in doorways. A lot of them didn't look like they'd been there long either.
There is no doubt there are "real" homeless people in Edinburgh (probably poor souls who've been thrown out of long term care) - but a lot (not all) of the younger people you see in Edinburgh are doing it because a) there are plenty tourists who will hand over some cash b) people who have traveled in from outlying towns/villages, spent all of their cash on booze and don't have enough to get home.
[NB I've helped a few people in the latter category get home, so I know it happens]