It prevents a pawn from using the two-square advance to pass an adjacent enemy pawn without the risk of being captured.
… which I understand. But why would this be a rule? After all, the pawn that is on the opposing side of the board is closer to being queened. Is the en passant rule to promote offensive attack?