Something not often mentioned is that some countries (UK, Spain and France come to mind) require a visa to transit through their airports.
I lost a 1300 USD flight once because of the flight I wanted to take to Bogota, Colombia passes through Rome and Paris. :/
While studying in the US, I once booked a flight to visit my relatives in Prague, flying into Heathrow, then flying out from Gatwick 18 hours later, leaving me with a whole day to explore London. It's supposed to be at the immigration agent's discretion, but he was happy to let me through, despite my Armenian passport.
Return leg was slightly more complicated, because the airline staff in Prague refused to check me in, since the flight was to London, and I had no UK visa. After at least half an hour of arguing, they ended up drawing up a waiver for me to sign, and let me on.