Sharing ground between devices connected to same power supply
It depends on the type of signals involved, but generally speaking, you don't want to add the power supply noise to the signal. This happens because the wires to the power supply have nonzero impedance (resistance + inductance), and the varying current flowing through them causes a varying difference in their actual "ground" voltages. This is known as "ground offset", and it gets added directly to the signal voltage received on a given board.

Adding a direct connection between the two boards "shorts out" that power supply impedance and eliminates the ground offset.