Castling when in check
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.