Try to find White a legal move here that is not the en passant capture. There is not one.
h 1 The white king is not in check, so this is not a mating problem. It is simply boxed in: g1 and g2 belong to the rook, h2 belongs to the bishop on b8, and the pawn on b5 cannot advance because a black pawn sits on b6. One legal move exists, and it happens to be bxc6.
That is the whole of the exception. En passant becomes compulsory the same way any move becomes compulsory, by being the last one standing. There is no clause anywhere in the Laws saying you must take.
The wording, and why it matters
Article 3.7 of the FIDE Laws says the pawn may capture the opponent’s pawn as though it had moved only one square. May, not must. Compare that with promotion in the same article, where a pawn reaching the last rank must be exchanged for a new piece: there the Laws use the harder word on purpose. The two special pawn moves sit in the same article and are worded differently on purpose.
Online you sometimes hear that a server forced the capture. It did not. What it did was offer the capture as one legal move among many, and somebody clicked it.
Taking is not always right
Here is the part that matters more than the rule. Capturing en passant is usually not winning a pawn at all, because the pawn that just jumped is nearly always defended by a neighbour. You play exd6, Black answers cxd6, and material is dead level. What has actually changed is the structure: you have given up a pawn on e5 that was cramping the enemy position and handed Black a half-open file and a central pawn.
Sometimes that is a fine trade, especially if the recapture leaves a weak pawn you can attack. Often it is not, and a strong pawn on e5 is worth more than the pleasure of playing a rules trick. Ask what the position looks like after the recapture, not after the capture.
The one occasion when taking is clearly right and people still miss it: when the jumping pawn is not defended, and the capture is just a free pawn. A free pawn is a free pawn.
If you want to see the capture as an idea rather than a curiosity, work through the en passant puzzles and then read why the rule exists, which explains why it has such a narrow shape.