Chess has a rule that forbids castling when in check. What is the practical value of this rule? How would chess without this rule compare to chess with this rule?
One important reason to check a king is to prevent him from castling later by forcing him to move. The reason is that a king that has already moved (and remains in the center) cannot later "castle" his way into relative safety on the side. Nor can a king castle while in check, so this prevents him from castling for at least that move.
There are two other ways to defend a king in check without moving him. One is to capture the checking piece, and the other is to "interpose" another piece between the checking piece and the king. If the king can then be prevented from moving, he can castle later. But these remedies expose the defending side to other risks, which are probably included in the reasons to check the king.
Per the wikipedia page for castling, it appears that castling arose in response to the growth in the power of the bishop and queen move sets. The line that is most interesting is a reference to the Gottingen Manuscript:
In the Göttingen manuscript (c. 1500) and a game published by Luis Ramírez de Lucena in 1498, castling consisted of two moves: first the rook and then the king.
If this is correct, than 'casting' while in check would entail moving the rook first, and then 'leaping' the rook with the king. If the king is in check when you attempt to castle, you would be moving the rook with the king still in check.