I saw this plotline as a corollory to the "Angel/Angelus" plotline of S2. You know, the "young girl gives it up and the guy changes to a creep" aspect of S2. In a lot of ways, the Spike/Buffy storyline is about why a girl would date/stay with a "bad boy". She knows he's evil, even though he is currently no threat to her. Buffy has been pulled out of heaven. She believes on some level that she deserved to be pulled out, and she hates the world, her life, and herself. I think in a lot of ways she is punishing herself, like she is not worthy to be with anyone BUT a bad guy. Yes, she was using him, but IMO she didn't think she deserved better. As she realized what she was doing, she broke up with Spike, who had fallen for her hard (pun). As she got better, she realized she was both using Spike and hurting herself. And we then see the common real-life situation where a spurned "bad boy" won't take "no" for an answer...eventually the bad boy turns on his "love" object.
Buffy was nasty to Spike, because deep down she hated herself. She took it out on him while using him to fulfil her self-induced debasement.