A script can continue after a failed command and finish with a successful status. That can leave a misleading completion marker.
set -euo pipefail changes several failure behaviors: failed ordinary commands stop execution, unset parameter use fails, and a pipeline reports a failing component. These settings have documented exceptions around conditional lists, so they don't replace deliberate error handling. Start with a plain failed read here and confirm that the later marker is never created.
Without pipefail, the last command supplies a pipeline's status, so a successful cat can conceal an earlier failed filter. With pipefail, the rightmost failing command supplies the status. A command used as an if condition or in a recovery list needs separate reasoning; -e doesn't turn every nonzero status into an unconditional stop.