There's a difference between being a nice person and a nice guy. There are other factors, as well. A ***** generally won't be attracted to a nice person - because she's not nice herself. Or at least, it won't stop her from being a ***** - simply because he's nice. Nice girls will date and appreciate nice guys. A lot of girls are interested in nice people.
The other point, which has been mentioned already, is physical attraction. This is where a LOT of nice guys get confused, and come to irrational conclusions. A woman will date a jerk because he's hot. She will complain about him because he's a jerk, but will still be physically attracted to him. She's bothered by it because she cares. She doesn't CARE if the nice guy is nice or not - because she's not attracted to him. She only complains because the hot guy is a jerk. She wants HIM to be nice - not the nice guy she finds unattractive.
This works both ways, too. A lot of guys assume that all girls want jerks because the hot ***** does. It's all they focus on - just like the girls who focus on the hot jerks. They don't care what the average nice girl is attracted to - because they're not attracted to her. They see the hot *****es going after hot jerks, and conclude that its what everyone wants - because that's who they are attracted to. It's all they see.
You will generally find that the only nice guys who complain endlessly are the unattractive ones. Not every nice guy out there finishes last. You just don't hear from them - because they don't have any problems. The ones who do always have the same story. They are never given a chance. Or, if they are, its half-assed - because the girl isn't into them.