As I understand it, it's also your IP's location, not necessarily yours.
For example, my IP is from my provider: 184.108.40.206, it says I'm in Kettering, Nottinghamshire because that is where my provider is based. I'm not, I'm in Kent.
Am I missing something? Is there more to this?