All triangles are 2d. Using atan2 to find the angle between 3d vectors would require projection onto an orthonormal basis.
atan2 requires this even in 2d, we just assume the natural basis and assume the other vector is x hat.
Dot product avoids all this in any dimension.