They get you either way
If you want to leave the airport during a transit, you will (in most places other than "home") have to fork out 5 or 10 quid for a "temporary visa" (BAH, Cairo, to name but two whose airport facilities are "less than admirable")