When commands on Bash are piped and the command on left fails, other commands are still executed and overall exit code if of the right side command. So if right command succeeds the overall things succeed, instead of failing.

 Adding set -o pipefail along with set -e will make the command fail