P
Are you talking about the finale of Season 6? Spike went to become 'what he was' - which is a vampire - so he could take Buffy down a peg but instead he had his soul restored. That's how I saw it. He, the same as Angel, was kind of cursed in a way to start with but he made the best of it. 😀
I thought it was made VERY clear (*points at sig for example*) that getting a soul is exactly why Spike went there. Joss just wanted to trick the viewers into thinking that Spike was there to become the tough baddie again before it was revealed that he got a soul instead.