You can also be tracked via local wi-fi access points. Google has built a database mapping access points to GPS coordinates. All they need is access to wi-fi information and they can find your location even if you have GPS and 4G disabled. There is really little you can do nowadays to protect your privacy.
The main point here is that they're doing the tracking with a typical user mode application without access to anything that a user would know is giving away their location.
Tracking location with other sensors requires more permissions.