I looked through the code but wasn't able to figure out where the difference comes from, but when running this command from a git pre-commit hook, docker exec -it fails with the error the input device is not a TTY, and without the -it option, the output is not formatted into tables.
Tools like PHPStan and PHP-CS-fixer have a --ansi/--no-ansi option which would be helpful here.
I managed to work around this by running the command with < /dev/tty.
Specifically, the following:
make doc-check < /dev/tty
# where this make target runs bin/php-doc-check
# which runs:
docker exec -it container /path/vendor/bin/php-doc-check folders