Well for one thing, (as already mentioned) noob is obviously derived from noobie which comes from newbie a lot of people thing its just leetspeak for someone new. Many newbies don't realize that noob and newbie are not synonymous. A lot of people (especially newbies) don't know what "noob" really means. So, here's an explanation for those of you who don't.
The term noob goes all the way back to the days of UseNet and is more of a disparaging term. It refers to the type of people that start posting things without taking time to learn what's expected of people in the group. Noobs are the type of people that jump into a forum discussion without having a clue of how they should act or what they're talking about.
When it's pointed out that someone has made a mistake. Especially if it's some type of netiquette mistake or totally misunderstanding of a topic being discussed, a noobie (or newbie) will try to learn a lesson from it. A noob on the other hand is likely to start bitching about how unfair everyone else is.
Most people even when they're newbies don't act like noobs, and many people who've been around awhile and should know better are noobs. Newbie or noobie typically refers to someone just starting out that has a lot to learn before they'll be able to start contributing, but "noob" implies a stupid noobie who doesn't even know how stupid they are.
----
So back to the OP's question about why people use it in usernames or to refer to themselves in posts.
Sometimes it's because its a newbie that doesn't realize there's a different meaning between the terms, and also they don't realize that they'll be stuck with that username even after it doesn't apply to them anymore. But sometimes it's chosen for the same reason people choose names like assface, fuckhead, etc. They know what it means and think its funny to use it for their username. Very often it's trolls that like to do that, but a lot of times it's really cool people that just have a twisted sense of humor.
When referring to oneself as a noob in a post, again sometimes it's someone that doesn't know the difference. Sometimes its just a comment acknowledging a mistake they made. If it's a netiquette mistake someone might say "damn I sounded like a noob", meaning they acted really stupid. or if someone did something wrong in a project they're working on they might say "damn it I made a really newbie mistake and wasted a bunch of time because of it." Which just means it was a simple thing they did wrong that they should have known better. Even in those cases there will be a distinction between what is meant by "noob" vs. "noobie" (or newbie).
----
Having said all that... here's one last thing that should be added to this thread.
This thread is useless without boobs:
http://www.youtube.com/watch?v=G9IzKTFYNX8