IP geolocation databases essentially represent a geolocation company's guess as to where an IP is located. Often they are based on the addresses in whois registrations, sometimes supplemented with the geolocation company's own research. For end-user IPs they are usually accurate to country level but for infrastructure IPs even that is frequently off.
When it comes to infrastructure there is often little relationship between IP addresses and physical location. Consider for example a point to point link between Europe and America. The interfaces at the two ends of the link will likely have adjacent IP addresses despite being on separate continents, no geolocation database provider is going to want to include that level of detail in their database.
And some addresses actually exist in more than one location at the same time. The routing infrastructure doesn't actually know or care if all the routes for a given address block actually end up delivering the data to the same place or not. Some service operators deliberately exploit this in a technique called "anycast", They deploy servers at multiple locations which all respond to requests on the same service IP* and then advertise the IP block from all the locations. This is why you see low pings to 8.8.8.8 from all over the world.
* In addition to the shared service IP the servers will likely have at least one non-shared IP that is used for management and for outgoing requests.