Let's cut to the chase--being a "bad boy" works much more than a girl being a bad girl. Women don't want the bad guy but they're sexually attracted to him. It seems really unfair and it is but accepting and understanding why it does helps.
When you're hurtful to someone it means you've gotten under their skin. You've assaulted their self identity and self esteem and caused them to question their very worth. They'd often never admit you did that to them like that but it happens rather easily.
And when you're young, you don't think wow this person is just a messed up individual that would mean you truly know yourself and your worth in the world and while most know this logically they don't feel it emotionally. they don't have the experience of life to know it's true. So instead you often just get your feelings hurt and the person, sadly, becomes more powerful in your eyes.
So then the bad guy has power because he was mean he's sunk his teeth in her flesh and now if he's nice to her and he listens to her it means so much more and she'll even say wow he's so nice even though he was just so mean because again he's established so much power by affecting her emotions.
And those who are not yet mature see pain as an itch that they need to scratch and in fact they get addicted to the cutting feeling itself and so they stay with guys who give them that powerful emotion and they constantly experience highs and lows.
And even the guy himself if he dates her long enough may be afraid to stop being mean because the reality is if he stops being selfish and cruel her feelings may change about him. This is known as flipping the script--when one person in the relationship suddenly becomes the nice one or the chaser and the other becomes the distant one and the chased. So then he reverses to his old self.
And the point of all this is that girls want emotional pain when they are immature. A lot of very pretty girls are immature. You, as a guy, have to ask yourself if you want to be attractive or if you want to be "good for her."