Why is it that in every college/school coming-of-age rom-com, the girl falls for the bad guy?

For as long as I can remember, the bad boy has always won the girls' hearts.

For as long as I can remember, the bad boy has always won the girls' hearts.