With only 2 turns to give 5 V the transformer must be for a switch mode supply.
With very few turns, the leakage inductance can be quite large. Leakage inductance is the part of the inductance of a winding that is not linked to the other windings. You also get the problem where one winding is better linked to the primary than another winding.
A 50/60 Hz transformer has output voltage and current that are closely related to the input voltage and current. However a switch mode transformer does not actually transform an input voltage. Some of the time power flows into the transformer from the supply, while no power flows out. Later, power flows out of the transformer into the load while no power flows in.
The input voltage is applied to the primary and the input current increases along with the magnetic field. At some point the input switch turns off and current flows in the secondary. The output current reduces along with the magnetic field.
The problem is that the current falls extremely quickly in the primary. If there is any leakage inductance, you get a big switching spike. The worse problem is if the primary winding is better linked to the auxiliary than to the secondary. The switching spike is transformed onto the auxiliary, and the auxiliary voltage rises too high, causing the regulator to shut down or fail.
The design that you show has the secondary winding closer to the primary than the auxiliary winding is. That way the switching spikes on the primary shouldn't be transformed onto the auxiliary.