cito man pwgen
:
In addition, for backwards compatibility reasons, when stdout is
not a tty and secure password generation mode has not been requested,
pwgen will generate less secure passwords, as if the -0A options had
been passed to it on the command line. This can be overriden using
the -nc options.