There is a secondary purpose for sounds on digital cameras: it makes it obvious to people in the vicinity that someone has just taken a photo. This is, indeed, mandatory in some places. I don't believe there is an actual law on the books, but government guidance in Japan is that if you make a camera or phone with a camera feature it has to loudly announce itself and it should be impossible to turn that off short of damaging the device. (This is largely to prevent sexual misconduct.)
For example, if you turn down the volume to zero and set my phone to manner mode, it will ring on taking a picture loud enough to hear 20 feet away.
Similarly, current model electric cars (Prius et al) are designed to run less silent in certain circumstances, mostly for the benefit of pedestrians and cyclists around blind corners. (I don't know if they shipped that one to the US yet.)