Dan pulls Rachel behind the carriage and yells at her about being the Anonymous bitch, and she's not backing down: "Blair spread false rumors, blackmailed the school, turned my job into a sham. With no repercussions!" Which is not really the lesson here, because your behavior and your vengeance are still your problem. And also, Rachel suffered no repercussions either. Dan realizes that she's just like Blair, but worse, because at least Blair is in high school and has about six personality disorders, whereas Rachel is just basically disgusting.
He whines that Rachel has crushed all of his ideals, and let's pause for a moment to consider for a moment the possible future parallel of Rachel and Elle, a dream girl fantasy who turns out not to be innocent just like May, okay, and what that does for a man's psychosexual development. The disappointment of the ho-bag is a hugely important step, because it breaks you out of your romantic mommy fantasies about how there's a girl who can fix everything for you by mirroring back you, just as you are, without any of the real growth or change that actual love demands. Having a blank boring girlfriend is the best possible case for a boy, but not a man.
So usually you have to have a Rachel or an Elle come into your life and act unpredictable and break you open before you can possibly understand that women are people capable of making independent and rational moral decisions; that just because when you look at them all you see is a big old mess of your own emotional bullshit doesn't mean that all they are is emotional bullshit: it's actually been you the whole time. Which is what Dan went through with Serena eighty times, and it's pretty much Newland's entire deal in the novel, and what Chuck's going through right this second. We see its effects on Chuck here, but I am willing to bet we'll see a compensatory growth in Dan, too. For now, though, he's content to be just awesome enough to grab the pissy Blair: "Hey, Blair. It's Rachel who's been messing with you. And we had sex in the costume closet, so you can do whatever you want with that."