Law enforcement has a hard time negotiating with Google to get your location at all times. Oh Google knows it but they won't just send everyone's location all the time, only specific requests with or without a warrant. Same thing for Apple.
The carriers can provide almost as good location data through just doing fairly simple calculations on timings and signal strengths received by the cell towers, and their implicit knowledge about where those cell towers are located.
Good keywords for further reading are (("4G" or "LTE") and "GMLC") or ("5G" and "LMF") and/or OTDOA.
While Google and Apple may be hesitant, what are your thoughts about AT&T or Verizon?
Bonus, no amount of jailbreaking or trickery can get around the fact that if your baseband chip is connected to the network, they have your rough location.