I was once on a flight from Phuket to Bangkok, connecting back to my home in Tokyo. In such a case Thailand makes you pass immigration on the first flight, so Phuket, then your transit in BKK stays on the airside.
While taxiing to take of, the front landing gear broke so we had to go back to the Phuket airport (still airside) until another plan could be made available. Since we would not make the connection in BKK, they collected everyone's passport to stamp them with a temporary transit visa as we'd need to go to a hotel in Bangkok to wait for the next connection.
After 2-3h the new plane arrived, we flew to BKK and upon deplaning at the gate, a flight attendant came in holding a trash bag filled with all of our passport and proceeded to dump it on the floor and let the 100 or so passengers sift through the pile to find their own passport...
When the plane has to land on the nearest airport, the chosen airport is very likely to be a small one and does not have any kind of international zone, and even without custom control.
A lot of countries will waive this requirement if you have a visa from the US or another first-world country. Have transited through CDG,MXP,AMS,LHR using a US visa.
I was not allowed to transit through Sydney to New Zealand even though I had valid US B1/B2, Permanent residence in one of the schengen countries, Canadian visa and UK visa.
Indians require transit visas when traveling through Canada. (I almost learnt this the hard way when flying through Canada, as a complete coincidence I had a canadian visa from a prior trip that was close to expiring)
Right, but Canada doesn't have a distinction between airside and landside transit. Although as a rule of thumb you should always check the rules for every country you are passing through.
I've never had this happen to me and my assumption was that if you stayed airside (didn't cross immigration) you would be fine.