I believe that sound is caused by the inverter that is used to charge the capacitor. In a camera, the capacitor used to discharge energy through the flash is around 600 volts and a couple of microfarads, but the battery is only a few volts DC. The inverter converts the DC to a high frequency square wave, and then that AC voltage is stepped up to the high DC voltage needed to charge the capacitor (since voltage multipliers only work with AC). I think in most cases the inverter frequency is above the range of human hearing, so it might be some subharmonic of the inverter frequency that we hear. I assume the same sort of thing is going on in a defibrillator.
I have an old Roland synthesizer with a display that also uses an inverter to step up the DC power supply to the 90 volts or so needed to run the electroluminescent backlight, and it whines like crazy. I can also hear a similar noise if I listen closely to my old PalmPilot that has a backlit diplay.