Your rook defends the attacked pawn. You developed your knight to block the check, saved your bishop, and met the invading rook’s threat.