Two reasons, firstly, girls like what they can't get, put it this way, water is the necessity of life, where gold isn't a necessity, but the same amount of gold worth a lot more then the same amount of water, why? Because, gold is rare. The same with girls and dating, rare things seem exculsive and increase their desire of wanting it. (unless it is SARS) and sometime guys who are not nice to them, give up a vibe of that rarelty. That is always why, I always say, reverse pyschology usually have a positive effect on getting extremely hot girls, that all the guys are going after.
Secondly, for girls relationship is more of an emotional thing rather then practical thing. So, while in casual relationships guys generally look for sex, girls look for different things. Sometime, they like a bit of excitment ande sometime bad boys do give out that excitment illusion, while most girls might have enough logical brain cell, to not actually go after a real bad boy, some just don't get it and usually ended up getting themselve in to a whole lot of mess as a result. Good bad boy type usually get all the girls. (You know, the type of nice guy that have a rebel type personality)