With the London Marathon, charities buy their spots for £300 each[1] and get well over £1000 (sometimes much more) in return for each spot. Marathons are very expensive to organize, so it is not unreasonable for the organizer to charge for the entires. In addition, many spots that charities get are given out totally free of charge.
In all, millions of dollars and pounds are raised through these programs.
https://www.virginmoneylondonmarathon.com/en-gb/news-media/m...