Why does white exchange knight for a pawn here? This other question asks about why white resigns at the end (Why did Polgar resign?), but running through the game, I am confused at move 49 where the board looks like this, white to move:

Polgar-Kasparov:

8/8/1k6/p6p/3n3r/PNR5/6K1/8 w KQ - 49 50


The next move is white to take the pawn with her knight, and have the knight taken by the king.  Since the knight would be lost, why not take the black knight instead?
After taking:

8/8/1k6/p6p/3r4/P1R5/6K1/8 w KQ - 49 50


Judith Polgar must have assessed this position to be easily winning for black. I assume black would just win the white pawn and proceed to promote the a-pawn.

Now, while a knight is generally worth much more than a pawn, the endgame King,Rook,Knight vs King,Rook is usually a draw. So Polgar must have hoped to win or blockade the h-pawn and reach a drawn endgame of the K,R,N vs K,R-variety. I guess she knew this wouldn't work out, but the rationale was to set a more difficult technical task to Kasparov than the above rook endgame.

Edit: I looked up the game in her autobiographical best games collection and it turns out, I was half right:

"Following the text move, the rook ending after 50.Nxd4 Rxd4 would be lost for me. Black would advance his pawns to my fourth rank and then activate his king using the rook as shield."

She then proceeds to give 50.Nxa5 an exclamation mark, explaining that it is a study-like way to a draw, because apparently she wins the black pawn by force (which I didn't see).

So, she did assume the rook ending to be lost (erroneously, according to Stephen's comment), but she actually saw that she would win the h-pawn as well, leading to a drawn endgame.