|| is a short-cutting or comparison operator which returns the first true thing it encounters.
| is a bitwise or combinator, which takes two sets of flags, and combines them into one set of flags that has all flags activated which were also active in the input sets.
Semantically, | is absolutely the correct choice here.
A better question would be why there's a $2 there, though i hope that's just a typo and means $e.