There are several reasons it is reason is that it's a matter of identification - so if you break a rule and then someone else uses your nickname they won't get the blame for what you've done. This is also a reason for the IdentD (username). Secondly, it's a way to ban you from channels which is sometimes necessary. Your ISP provides you with your hostname/iP.

There are several methods to hide your IP address, most outlined in this thread. Shell accounts do often cost money, so if the network you use doesn't support the +x usermode then you'll either have to put up with the IP address being shown, move to a network that does support +x or fork out some money.

To be honest, it isn't that much of a security risk. True to say if you annoy certain people they will be able to packet you using your IP address, but as far as people tracking your location and what not there is very little danger.