The other factor is sometimes, people ask for silly money because they don’t want to do the gig. Rather than say no, just ask for insane amounts. I suspect DW along with JKR could fill their entire year with school visits. He probably allocates x days for publicity including schools - after those are filled, its his standard corporate rate. And if people are stupid enough to pay it.I've seen it happen. And been told there wasn't any money to give me a payrise or pay me for my contracted and payable overtime by the same people that signed off on it.
When we had mass redundancies (getting rid of the older staff), because big flashy shows were something the head liked, they spent £1500 on a starcloth for the stage when there were already perfectly serviceable blacks and flats. And then £1800 on renting a backdrop for the show. Plus the professional lighting crew (£7000). And the professional musicians (very much against the terms of the show licence, by the way). and the £2 grand license plus 10% of the takings. And the staging rental. And costume hire.
Couldn't afford new textbooks or to repair the roof, toilets, heating...
I suspect that private schools are the most likely to book big names, however. They do have oodles of cash (my sister worked for one).
At the other end, I also have an issue with expecting authors to work for free - school events take time. Done properly, an author will prepare the event and use at least a half day including travel. Often, the event won’t instantly result in sales. Most authors do not earn enough to live off including most children's authors. It simply means that more privileged people can afford to do the working for free bit and exclude authors who have to work to pay the bills.