When I was really little, our family got a gentle rains fountain. It had a horseshoe-like hole in the back, and a somewhat round hole in front. It came with the pump the one we’re supposed to plug into the wall. However, we didn’t know what to do with the pump. Only plugged it in, it made a really awful noise, but after we figured out that we needed to put it inside the water, the noise thought of Wound down. It was a really loud, high pitch noise, around 520 Hz, or something like that. Surprisingly, it didn’t sound like that again, even when we took it out of the water. Instead, it just made a 60 Hz hum.
It might have been a diaphragm pump. These have a small magnet attached to a flexible membrane and driven magnetically by mains current through a coil.
They’re meant to vibrate at the mains frequency, with the moving diaphragm pushing water.
The inertia of the water prevents the magnet from moving too far. Without it, the magnet moves until it hits a mechanical stop with a bang, then goes back the other way to make another banging noise. At 50 or 60 Hz rep rate, it ends up making a really loud buzzing noise.
The magnet rotates with the incoming mains frequency .When there is no water there is no lubrication of the plastic coated magnet and the plastic housing .Water is a good lubricant for plastic parts .Also the water muffles some of the remaining sound .