I recently went on holiday taking my iPhone but not my Mac. Once home I noticed, on my Mac, the location Google shows at the bottom of the search page was the exact place I had been on holiday - I had not yet logged into my Google account on my Mac since returning. I had once opened Google on Safari on my phone whilst away but had not searched anything - I was logged out of Google on Safari. I am wondering how my Mac knew the holiday location, does Google transfer location data without being logged in on both devices? I use Safari on my phone but Chrome on my mac so am very confused.
This appears to be a feature of your Apple devices working in conjuncture with eachother by utilizing Location Services. Apple devices use location services for things like (Maps and Navigation). All software uses Apples base location service which you give permission to use. If location services determined your location based off a cell tower a few miles away, your location on the Google search page may show your location as in the town over.
So your Mac at home received data from your iPhone. Since you had not logged into your Google Account on the Mac, Google Chrome pulled the location information from your Mac as a best guess. If you were logged into Chrome you may have set your location permanently which would have mitigated this.
Location services are active always. Toggling buttons may reduce blatant siphoning of this data but the software on your phone/pc has only one choice but to utilize the hardware of the phone/PC to acquire this information. Go to Privacy > Location Services > System Services then Significant Locations.
Your concern seems to be that Google may to collecting and retain location information when your are not logged into their services. I believe the default Chrome behaviour took over and gathered the location data from what the iPhone provided. The iPhone syncs with your iMac at home and again, you are not signed into Google so by default it gets the best possible location from what the iMac is reporting. iPhone speaks to iMac through accounts. Google with no account on each device goes back to default and selects location reported by synced Apple devices.
I won't leave you with no troubleshooting options. Try clearing your cache and cookies.