Spike and Anya had sex for the same reason Buffy had sex with Spike, they hurt. Buffy is mad at Spike and hurt, too which shows she has some feelings still. Spike has to become better because he kept trying to drag her down. I need to be in the mood to watch sad episodes like this.