I am not asking what geolocation service to use or how you use them. 

I am asking, how the do these companies know so well where every IP address is? Is there some breach of privacy being violated? 

I looked at the wikipedia page, and all they had to say was using the WHOIS service, which obviously doesn't work at all: my IP is owned by a company listed in another state.