Capturing a piece or moving a pawn irreversibly changes the state of the game and thus resets the counter for the 50-move rule. Since castling irreversible changes the state of the game too, it seems to me that it should reset the move counter too, but it does not. Why is that?
I don't know the reason, but I can make a guess.
In standard algebraic notation, it's fairly easy to look at a scoresheet and see whether a capture has been made or a pawn moved. Captures have an "x" in them, and pawn moves don't have a piece listed. But if loss of castling rights also triggered the 50 move rule, you'd have to look at the rest of the game (instead of just the last 50 moves) to see whether castling rights had previously been lost. This would seem to increase the burden on arbiters.
Also, it's rather unusual for this to matter. Most people are going to move their king (and/or both rooks) before they reach a point in the game where the 50 move rule would begin to apply.
After some discussions in the comment section I think it's time for me to start answering this question to the best of my understanding. First off, let's discuss the use of the concept "the state of the game". Although I sort of understand what you're trying to say I still wonder about weird cases such as the following:
- e4, e6 2. e5, d5 3. Nf3
Has the "state" of the game changed on move 3, since white was allowed to capture the d5 pawn en passant before, but is now unable to do so after the third move? According to you, this would mean that the 50 move rule counter should be reset not on 2...d5 but instead on 3. Nf3. Since you only give examples of what would change the "state" of the game rather than a definition of what a state-changing move should constitute explicitly it is difficult to know exactly what you're trying to convey when using this concept. Please feel free to comment what you think should happen in the above scenario.
Let's go on to talk about the reasoning behind a rule such as the 50 move rule. What is the purpose behind it? The purpose is to force players who refuse to accept a draw to demonstrate an actual plan of action for winning the game. This is done by forcing the stubborn player to eventually try to either
a) resolve the situation on the board somehow by capturing/trading material, or
b) to make some progress in the position by pushing a pawn forward, presumably trying to queen it.
If none of actions a) or b) are taken within 50 moves, then it's determined that neither of the players is making an honest attempt at winning the game, and it's up to either player's discretion to make a draw claim when the move limit has been reached. Nowadays it is possible to show with the help of tablebases that there are indeed positions where one side can force a checkmate but has to shuffle pieces around for way more than just 50 moves before either of actions a) or b) can be taken, however the rule still stands. This is because of the fact that positions where one side can force a win only if they're given more than 50 moves of piece shuffling are extremely rare, and in practice impossible to determine for human arbiters.
With the above motivation of the 50 move rule in place, what is the case for amending the 50 move rule to include castling as a move counter-resetting move? All in all, it doesn't really try to resolve any situation on the board by making a capture, and it does not try to make some sort of progress either by moving a pawn forward. The only thing castling really does is to shuffle two pieces along the first rank. Sure, after castling once you may not castle again, but what does that have to do with attempting to make progress of some sort in a game of chess in contrast to other moves made by other light/heavy pieces?
Capturing and move pawns are not reversible, in the sense that the position occurring before the capture or the pawn move cannot any longer occur in that game.
To make an example, after 1 e4 d5 2 e:d5 there's no way back: white will never have a pawn in e2 again so Black's with the d7 pawn. Also, Black will never have 8 pawns again.
Castling in not irreversible in this sense. After, say, white castling king side it is not unconcievable that the King may return in e1 and the rook in h1 with the position prior to castling occuring again on the board.