I agree the 4-5-6am openings are insane, but outside of set days, shops are free to open whenever they want.
They must think it's worth it, though, else they wouldn't bother paying their staff to be in at the crack of dawn. At the end of the day, businesses are all about making money. If they fail to make a profit, shops will close and their staff will lose their jobs.
If people refused to queue outside next at 5am and didn't go shopping at that ungodly hour, the shops wouldn't make money at that time of day and wouldn't bother opening so early.
It's a bit like where I live, the shops have summer/winter opening hours because once it gets dark and cold, staying open late (like you do in summer) is pointless as you make no money once you've paid out for wages, heating, electric etc.
Shops would not open if they didn't make money. Nobody needs to go out at 5am so until people realise that and choose to stay at home, shops are going to make money when they can.