Este é um comportamento documentado.
A página man do bash (1) diz, para set -e ,
The shell does not exit if the command that fails is part of the command list immediately following a
whileoruntilkeyword, part of the test following theiforelifreserved words, part of any command executed in a&&or||list except the command following the final&&or||, any command in a pipeline but the last, or if the command's return value is being inverted with!.
[Emphasis added.]
E a especificação POSIX Shell Command Language confirma que este é o comportamento correto:
The
-esetting shall be ignored when executing the compound list following thewhile,until,if, orelifreserved word, a pipeline beginning with the!reserved word, or any command of an AND-OR list other than the last.
e Seção 2.9.3 Listas desse documento define
An AND-OR list is a sequence of one or more pipelines separated by the operators "
&&" and "||" .