Why should one add 180° to the arctan() result of a complex number?
The one-argument arctangent function (atan()) can only return answers in quadrants I and IV. If you know that the point is in quadrant II or III (i.e. the real component is negative) then you need to transform the result via rotation by \$\pi\$ around the origin.

The two-argument arctangent function (frequently known as atan2()) does not have this caveat.