I don't believe in karma(I wish there was such a thing, but until proven...) but that was wonderful to see. Now, during re-watches, I can feel sorry for her because I rember that she will improve. Maybe I even felt that the first time I watched season 1, I can't remember, but now I feel it. But she was such a bitch in season 1-3 of Buffy. In season 1 of Angel as well, but that faded pretty quickly, and she was actually more unintentionally a bitch in that season.
So, yes, it was great to see Cordelia like that. If there was karma, that was it. It still suprises me that someone so cruel as Cordelia could improve to the degree she did(makes me think she knew all along that what she did was very wrong, which doesn't make it better). So it seems like she really needed to go through that phase to grow as a person. It taught her empathy for other people, just like being tortured by visions later that seasons taught her even more.