Why does swapping the X and Y mapping coordinates break 'box' mapping?
The Box mapping uses the direction of the face to determine the mapping. This means that the faces parallel to, say, the Y-axis are mapped as X,Z to the image's coordinates, while those parallel to the X-axis are mapped as Y,Z to the image's coordinates.

By swapping the input coordinates in that way you are upsetting the mapping so that, say, for the faces parallel to the Y-axis are mapped as Y,Z to the image's coordinates - but since the face is parallel to the Y axis, Y is constant - so the image becomes distorted on that face (as only one axis of the image coordinates varies; the other is constant).