It doesn't. However, IPs are "owned" by companies and that ownership is public record, therefore, you can get a reasonably good idea of an IP's location by linking the two. This is a common enough practice that there are companies who bundle and sell this information.