Re: "Things were purposefully not documented"
The mistake might have been not deliberately created, but found to be profitable to leave in place OR embarrassing to reveal.
Having said that... even back whenever, you don't "just" "fix a bug" in software that the company runs on, on your own. There is a process.
I got yelled at today by one senior colleague for mentioning to another senior colleague an issue that hasn't been addressed since 2018.