Arduino Ground connection to any ground pin

Hello,

I have a question, in some cases i use an external power supply to power some devices which they require different Voltages such as motors.
my question is why do i have always to connect the ground pin which is between the device and the power supply to the arduino and if i do not connect it it will not work.
Can any one answer my question in a logic answer.

Many thanks

Any current that comes from a source needs to go back to that source. So if your arduino is connected to e.g. the base of a npn transistor, the current through that base has to flow back to the arduino (in this case through the emitter). The same for the current (e.g. from the 12V supply) through the collector of that transistor that also will have to go back to it's source; also through thr emitter.