The units, unfortunately, aren't yen or Turkish lira but, rather, dollars or euros.
Why so expensive? For each bug you see in the initial run of testing, there are a couple more behind it, masked by tests that failed to complete. Further, a bug in somebody else's code may surface in yours, making the debugging chore fairly convoluted, particularly if that original developer is now gone.
Why are the "results" bugs more expensive than simple execution errors such as index-out-of-bounds? Results bugs often involve troubleshooting and fixing data problems as well as coding issues. The more teams you have to work with, the more expensive it all gets, thanks to coordination and finger-pointing. Older bugs cost more because the developers have had more time to forget, and more data has become corrupted by anomalous processing.
None of this should come as a surprise, and none of it is the fault of any particular product. Some products make things a bunch easier but the root cause here is loosely coupled development and the inherently "centerless" model of cloud development and execution cycles.
The best practices come straight from the formulas above. Have fewer system admins, minimize the number of custom objects, have fewer independent developer teams, do full system tests weekly and repair the bugs as soon as you can.
Sign up for CIO Asia eNewsletters.