en passant and castling, were these rules established for a reason?

Sort:
The_Real_LF
Every other rule in chess is pretty straightforward, piece x moves this way, piece y moves that way. Get your pawn to the other side and you promote, so on and so forth but en passant and castling seems like forced and unnatural rules. Just wondering, were these rules created to cover flaws in the game of chess?.

Seems like these 2 rules took some thought, not very organic rules. I'm new to the history of chess, so are these rules in place to stop a loophole or to prevent some kind of cheesy strategy? Get the feeling there's a strong purpose for both of them, how would chess be without the ability to castle?
The_Chin_Of_Quinn

En passant is capturing a pawn that's moved 2 squares as if it's only moved 1 square. So the reasoning is the double square first move can't be used to bypass the opponent's ability to capture. It's to keep consistency with how space and structure works. (It used to be pawns could only move 1 square at a time, which was changed to speed up the game).

Castling protects the king and helps bring an otherwise difficult to activate rook into the game. With a safer king and better harmony of pieces, the game gains depth of tactics and strategy. For example if the king were always vulnerable and piece coordination were difficult then it would just be a game of quick attacks.