> the costs of software development are in the bug hunting phase and visibility > violations almost never produce bugs.
Visibility problems can cause support problems, though. If you create & support a library, you don't want clients misusing it by calling functions that are supposed to be internal/private. If they do, it can lead to hard-to-diagnose bugs, and compatibility issues next time you update the library and the private stuff they were using has changed. You can argue that "clients that do this deserve what they get", but if they have a support contract this can chew up a lot of expensive time in the back-and-forth before they reveal that they were using non-public API. This isn't hypothetical. Couchbase deals with this a lot, not so much with private API because we use languages with stronger access control, but with equivalent API misuse by clueless enterprise drones.