Have you been to a website (or used an app) that was able to tell what city and state you are in? This is called geolocation and it's powered by third-party databases.
Not all geolocation services are the same. These services use different algorithms that look at factors like:
At best, the location information presented is an approximation.
Anyone with some time and a little patience can submit a request to have a geolocation provider make an update. Here are some tips to get you started: