You location found is based on your ISP, IP adress and their routers etc. The search and advertisement trackers have a rough idea based on IP address info.
Unless you have location services turned on on a mobile device, then it's spot on, especially if the application you allowed location services also allowed to give anonymous details to their advertisers.
Or the search engines know what you (your IP address) have searched for, bikes in London etc, and then target you with ads for bikes in London.
It's clever and it's how most of the money is made on the internet.
When we now have recorded TV and video on demand with the ads missed out they have to get us somehow, albeit targeted to what we like and have looked for anyway, how will they sell us anything new we haven't already thought of wanting?