I totally get your point. Airline performing regular flights to certain destinations either have to train up their staff or hire a small team of specialists / lawyers who they can refer to in case of a question. They don't have to be on the ground, can be called on a phone.
In ideal world (my version) the airlines should not be carrying out duties of immigration / border control. Only verify identity and signal the authorities if the person is on some sort of list. The passenger should know the country's laws and have some insurance (in case if denied entry and has take a flight back) or be liable for their actions. I don't understand why carriers were made responsible for immigration. They should be responsible for transporting people from point A to B, safely and on time. Everything else is extra.