iOS has a bypass list for “Do Not Disturb” mode, but sound is disabled via a hardware switch next to the volume buttons.
As a workaround, I’ll use the “Find my iPhone” chime which is the one way to bypass the hardware switch if I need to get my wife’s attention while the phone is set to silent.
Then it wouldn't be a hardware switch anymore, just a sensor.
Meaning software could mess something up and "embarrass" you in public, completely voiding the point of the mute switch.
But this is exactly how it works. On my 8, I have emergency bypass turned on for my wife. When the hardware switch is turned to the "silent" position, I still get a ring when she calls and a tone when she texts. Everyone else I hear nothing.
It seems likely that the side switch is anyway connected to software - on iPad its purpose is configurable and I think it was for a short period on iPhone. I always assumed the point of the switch was for quick and convenient access, not for certainty. Besides, the hardware button also fails embarrassingly when full of lint.