Connect to their WiFi, or your WiFi is off and still scanning for (E/B)SSIDs and thus can triangulate your location (this is what Google location services does), same thing with Bluetooth, apps/OS will grab your GPS location, and your phone carrier is selling your live and historic location data to anyone who wants it, including your government.