First and foremost to avoid confusion:
In this thread GND refers to circuit common or 0V. Like the Arduino GND pin.
EARTH refers to the protective earth wire (PE) that is stuck inside actual dirt somewhere in the building.
I have stumbled upon the concept of "Ground Potential Difference" and one thing I don't get is why should GND be connected to EARTH?
As I understand it for ground potential differences to arise a connection from GND to EARTH should exist, as explained in this application note:
Other than this application note I have also noticed the circuit common being connected to earth in an LCD TV I opened once. All the metal parts inside the TV where connected to the GND. And they were also connected to EARTH wire too.
Why would anyone do such thing if this creates ground potential difference.
Also, by doing this you are essentially connecting the isolated secondary of your power supply back to the mains circuitry. Doesn't that defeat the whole purpose of isolation?
How would it "create a ground potential difference" (whatever that is )?
No, you are connecting it to the protective ground, not the mains as such.
The protective ground may be connected to the mains neutral somewhere at the mains entry, but the point is that (exposed) parts connected to that protective ground cannot be at a dangerous potential (and if some "live" part contacts those grounded parts, the circuit breakers or RCD will shut the power off.)
Earthing is required for equipment that is not double-insulated.
The GND or circuit 0V is sometimes connected to the chassis (usually metal). This is done so that the chassis acts as a large RF/EM shield.
Now some equipment has the above as well as earthing on the chassis to prevent electrical shock should something short to the chassis (power transformer for example). But this is not ideal in certain applications such as audio where it can lead to "ground loops" and hum getting injected into the audio. The solution is to isolate the system GND from the earthed chassis via a "ground lift" - this allows RF/EM shielding as well as isolates the 0V point from earth at all frequencies of interest and effectively breaks the ground loop.