Usually when used like that there is an additional low resistance ground connection as well. The diodes are, as Audioguru points out, there to limit the voltage differential that might appear if the ground connecton is removed. You see it sometimes where units are plugged in to something else and when unpluged the ground conection would be broken, the diodes (often Zeners or two diodes in reverse parallel) then ensure the potential is limited to their Vf. When the connection is made, they are shorted out and the direct ground connection is used instead.
Brian.