I'm baffled though by Turkey, India and Egypt. Could people from these countries not book a flight? Sorry if I am being naive, I just don;t understand why they could not access travel via mainstream means
The short answer is they don’t get given the choice.
Mainstream international travel requires a passport , which lots of refugees don’t have, and often can’t get from their first country of arrival. Even when they do, for most nationalities travel to another country requires a visa, obtained in your home country before you leave it. Embassies in refugee first arrival places like Turkey don’t have the resources to offer visas as the scale that would be needed. No visa, no boarding.
The longer answer, for the EU (other countries have an equivalent) is that there is an EU Directive (the Carrier Sanctions Directive 2001/51/EC) that imposes sanctions on carriers – such as airline companies – if they transport passengers that are not in possession of valid travel documents. Fines can be up to €500k.
A clause in the Directive does say that signatory countries airlines/other carriers should take account of obligations under the 1951 Geneva Convention, which means airlines etc shouldn’t prevent asylum seekers from travelling. But - and it’s a massive but - that means check-in staff are left to decide, in just a few minutes, whether someone is a genuine asylum seeker (never illegal) or an illegal immigrant, and not surprisingly, they err on the side of caution.
To help staff decide, most EU countries have asylum/immigration experts at the airports and ports, but they can only advise, and there are no benefits to airlines etc in taking that advice, and high financial. risk if it’s wrong, so again, erring on the side of caution wins.