Google merely drive past your house, recording your GPS location and WiFi SSID broadcasts, and find it that way. And "accidentally" packet capture some of your network traffic too. ( https://www.wired.com/2012/05/google-wifi-fcc-investigation/ )
I used location sharing actively then as now, found it mostly annoying - but also learnt how they built up their SSID location databases.
I did find it creepy, but could also see how it would massively assist location services.