Water Temperature Gauge Not Working

99% of the time, owners do some inst' panel repairs then power it up for testing before completing the reinstall. That's what I assumed is your case and why.
The housing gets its ground via the hardware that holds it in the dash.
Not everything in the housing uses that ground path. Park brake lamp is grounded by the switch on that mechanism. Oil warning lamp is grounded by that sender, and so on.
Illumination, turn indicators, just about everything does require the chassis ground. Is this making sense now ?