Haha, just kidding last post :)
Yeah look it is good question, why can't the king castle out of check.
Maybe when they set the rules, on the another day, they could of allowed it. All i can think of, is, castling is like a big production. You move the king 2 squares instead of one, and the rook also moves in the very same turn. Therefore, it cannot be done 'fast enough' to get out of check :)
So yes, i don't know hehe.
As far as why the king cannot move through check, dont know either, all i can guess is, 'the king cannot move into check', the rule see's moving through check as 'being in check while moving' so to speak.
It actually doesn't move (finish) in check though.
Interesting and great question.