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.
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?