I'd like to make explicit a point that's been hinted at by the existing answers.
I'm from an AI, not specifically a chess, background. The usual approach to problems in games like this is to treat the game as a Markov process: a system in which future states are (maybe probabilistically) determined entirely by the current state, with no need for an explicit "memory" of how one arrived at the current state. Everything there is to know is represented in the observed board state.
In this context, a chess engine wouldn't need to be aware of any history at all. Maybe the players just randomly placed pieces on the board until they arrived at the current board state: the engine doesn't know or care if it was switched on mid-game or whatever, it doesn't rely on remembering anyone's past moves. This makes sense: suppose your engine did pay extra attention to the fact that opposite-side castling occurred. How long should that matter for? Should we learn separate evaluations for "the pieces are here, and OSC occurred [1, 2, 5...] turns ago"?
Humans playing human opponents may develop a model of opponent psychology: maybe you can tell your opponent's attention is fixated on a certain part of the board, or predict what they're planning based on their prior moves, their tempo, the decisiveness with which they handle the pieces. For a computer to consider this would require adding far too much extra uncertainty and supposition into a problem that's already really really hard just from the board state combinatorics--assuming you could even find a way to communicate those factors to the computer. And learning from it would mean learning bad data about board position--because the computer would have to separate the learned model of its (individual) opponent's psychology from the learned evaluation of how good a particular board position is.
Instead the computer plays like one of those chess masters who plays 15 different opponents at once: by ignoring the history of the game and just making moves based on where things are now.
My guess is that the chess experts you're alluding to are giving a heuristic for evaluating board states. Now, it's possible to imagine an engine which looks at board states and classifies them according to various properties: "OSC has occurred," "[I/my opponent] control[s] the center of the board," etc., and then predicts moves based on those properties as features (to reduce the overwhelming combinatorial complexity of board states & capture some of their natural symmetries). You now have two learning problems: first, how to identify a board state that meets a given heuristic; and second, how to use that set of heuristics to determine how to play. This might have been interesting twenty years ago, but it looks like the state of the art is past that (although this is probably happening in some sense in neural network-based chess engines; but as is typical for neural networks, we humans don't recognize anything coherent in the features that are learned in the middle layers of the network.)