Software development is hard because you can't see all the underlying structures and neither all second-order effects of a change in your code.
You can make a dependency graph of which file depends on which files, or which component is used by other components, but you can't create a dependency graph of side effects.
Every new feature that you add to your software will interact with some of the existing features that you already have. Some of these interactions will be easy to see, but some of them are second-order effects that you only see when a user open a new support request because you break her/his workflow.
Manual Testing and QAs
Everybody knows that software grows in complexity faster than you can add more QAs to perform manual testing.
Every new bug in a pre-release test makes you need to retest all the other bugs because now you are not sure if they break anything else.
With manual testing, you ended doing more testing than actually working in your product.
How not to get bitten by this bug?
The only way that I know that we can catch second-order effects in code and don't be surprised with new bugs in production is to invest and add more automated tests.
Each new automated tests hold the line to make sure you won't make a regression, that you won't make that bug happen again.
Second-Order Effects of Automated Tests
When you have more and more automated tests, your team will be more confident. They will code faster, they won't be afraid to improve some old code because they know they are being assisted by many tests.
Automated tests let you keep improving the underlying structure of your code (aka refactor) without breaking current behavior.
Automated tests reduce the time you need to perform manual testing.
Manual testing is still needed, as we can't encode all nuances of business logic in tests, or automated tests still too costly to be implemented.
You also avoid blaming culture, as a new bug is not only a problem of one developer but the problem of some missing tests.