He loved Buffy so much that he went and got his soul back. He nearly died in the process, but he wanted to be worthy of her. Even though he knew that she would never really return those feelings. He still did it anyway because he loved her that much.