I don't think any of the previous explanations are sufficient.
Ground loops usually refer to
inductive ground loops. The earth ground leads and/or signal wire shields form a closed loop. Current is induced in these loops by ambient AC magnetic fields from mains current flowing in the vicinity according to
Faraday's law of induction. The magnitude of the voltage around the loop is proportional to the area of the loop and the component of the magnetic field perpendicular to the loop, so bundling grounded power leads and bringing them to a common outlet strip is reduces hum pickup because it minimizes loop area.
However, what the OP is presenting is not an inductive ground loop, because there is no closed current path. The ungrounded SMPS supplies a laptop which drives a USB-powered DAC which drives the headphones. There is no loop involving either ground leads or signal shields.
This is an example of
capacitive AC pickup. The output of the SMPS is dielectrically isolated from the mains through a transformer, but there is some capacitive coupling between the mains and the output through parasitic capacitance in the transformer, and frequently by a small bridge capacitor deliberately added between the mains side and the output return to suppress electromagnetic emissions. This couples some mains AC into the laptop, through the USB return, into the headphones, where it couples to the listener through conduction or capacitance. Every object has some capacitance to the environment (i.e. earth ground), including the DAC, the headphones, and the listener, so a small AC current flows along this path. The current will be very small because the mains frequency is low and the capacitance to earth ground is small. The entire current loop consists of earth ground through the utility supply transformer, to the domestic mains, to the SMPS, to the USB return via capacitance, to the headphones and listener, back to the earth ground through capacitance.
There is also the possibility that the AC signal conducted from the SMPS consists of the mains frequency modulating the SMPS switching frequency, which is on the order of 100's of kHz to 1's of MHz. This high frequency would be conducted much more readily through capacitive coupling, and could be rectified into audible hum by the circuitry of the DAC. That would be an example of conducted electromagnetic interference (EMI).
When the DAC is connected to earth ground, this current path is cut short with a direct path to ground, so it won't flow through the headphones and listener. The fact that this stops the hum suggests that the DAC/headphone amp is sensitive to common mode AC current in its headphone output. This seems to me to be a design flaw in the DAC's headphone amplifier.
The way for the OP to test if the above hypothesis is correct is to unplug the laptop from the SMPS and run on battery power. The hum should stop because the capacitive connection to the mains is eliminated.
A USB galvanic isolator should greatly reduce or eliminate the problem by breaking the capacitive path. Such isolators have some input-output capacitance but the amount is very small (2pF for the ADI version). A USB to TOSLINK transmitter/receiver pair would serve the same purpose with even less capacitance.