How does iPhone know I'm travelling with location services switched off
It's not geolocation. It's detection of specific motion. See Settings > Do Not Disturb.

See How to Use Do Not Disturb While Driving