So I just stumbled across this account of a traveller which I can imagine to be pretty distressing because I myself have had a rather close call not too long ago. I was travelling from Singapore travelling to Switzerland (to which I can travel visa-free) and a recent relaxation of regulation allows me to apply for a residency permit only after landing in Switzerland, instead of having to apply at the Swiss embassy in Singapore. Thus I travelled to the airport without any visa and the airline did not want to let me board because I did not have a swiss residency permit on hand (yet) or a return ticket. However I insisted that based on my own research I shouldn't already need a residency permit to enter the country, but the airline was firm on their stance. I argued with the manager for a while and eventually they let me board after I provided enough evidence that I had sufficient reason to be living in Switzerland and as a result I almost missed my flight.
My question is, to what extent do airlines have the right to reject people from boarding due to immigration issues at the destination country? My logic is that even if I landed in Switzerland without a residency permit and don't manage to acquire the necessary documents then, it should be the responsibility of the Swiss immigrations to kick me out of their country, and not the airline's (which isn't even swiss airlines)?
Anyway, it turned out in the end that I acquired my residence documents successfully in the country, so the airline would have done me a great disservice had they successfully barred me from boarding the plane.