It's not illegal. If you don't want to send that information (read the terms in your browser's agreement along with all documentation) use a different browser. Your browser sends that signature to everything it accesses. You connected to that server, therefore exposing your IP. A simple DNS resolution of an address will show the domain (a vital Internet function).
If you seriously don't approve, move to Linux and make your own browser. Beware, though--many sites won't send you any data unless you have a certain signature sent in your requests.