I thought you all might want to see this:
TVGO: Why was Anya marked for death?
Whedon: I wanted to kill somebody, and I wanted to do it brutally and suddenly and never really pay it off. I wanted a death that was a real middle-of-the-battle death "” the opposite of the Spike death, [which was] perfect, noble. And Emma had made it clear that she really was not interested in coming back. I think things with Fox weren't great and she felt ill-used "” not by the show. She had a good time making the show, I think. But she was ready to move on. But it was tough [killing her off]. The last shot before we wrapped her was that shot where she gets sliced. And it's very weird to play your death and go, "Okay, I'm done."
TVGO: No one seemed to be too broken up about it.
Whedon: I had a lot to wrap up, so I let Xander (Nicholas Brendon) have a moment of closure about her, just enough to get him to the point where he could rejoin the group for a moment of, well, "We won." You have to get yourself to a good place if you want the show to go out on an uplifting moment, which I did. So I used shorthand.
---------------------------------------
From http://solitaryphoenix.com/AngelNews52303.html
Also, in Buffy magazine, they said that Anya was originally intended to be killed in season five's The Gift. So, I guess we should be happy that she lasted until season seven's Chosen.