Historically, en passant is one of the last series of major rule changes in European chess that occurred in the 14th to 15th century, together with the introduction of the two-square first move for pawns, castling, and the unlimited range for queens and bishops. Because of their separation from European chess prior to that period, the Asian chess variants do not feature any of these moves.
The idea behind en passant was that when the two-square first move for pawns was introduced to speed up the opening phase, this should not allow pawns to sneak past opposing pawns. Although a novice introduced to en passant by an opponent in the course of a game will often react with incredulity at the apparent illogic of this rule, upon closer examination, it is quite logical. As its name implies, the conceit is that a pawn, which ordinarily moves only one square at a time, cannot move immediately to a square two rows ahead. It is thus vulnerable to being killed "in passing" through the first square to get to the second. The same principle can be seen in the rule that one cannot castle through 'check'. Since a King ordinarily moves only one square at a time, he cannot move two squares at once, and thus renders himself vulnerable to being killed in passing through the first square. Since by the conventions of chess, a King is not allowed to expose himself to death, castling through 'check' is not allowed.