Each manufacturer has their own way of documenting pinout when it comes to modular devices (stand-alone devices or sensors that have interfaces with pins for direct connection or connectors for direct connection), sometimes diagrams are not always oriented in a way that seem to match the “physical layout” of the pins. Sometimes there can be a disconnect between the three dimensional layout and the two dimensional diagram where the pins on one side may seem to swap places when comparing to other diagrams. You could end up providing voltage to ground and ground to the supply pin, which would most likely short the part out.
Here is an example of a part where something like that can occur: 1855-1000-ND ; GP2A200LCS0F a reflective distance sensor made by SHARP/Socle. This is important to remember: two dimensional pinout and electrical diagrams can be flipped around and rotated to match with the expected three dimensional layout, they are not always drawn with the same orientation to match with actual 3D pinout. Page 2 of this datasheet shows important context with the two dimensional drawings with projections of each face as to where pins 1, 2, and 3 actually reside. For those not familiar with “projection drawings” here is a little visual that will help:
These drawings are pretty standard in computer aided designs where you see multiple perspectives of the same part, in this case the “front view” matters most as this shows the true pinout in a three dimensional sense. This is supposed to give context to the two dimensional electrical diagrams since pins 1, 2, and 3 are given definite locations depending on how you rotate the part.
The manufacturer thought it necessary to only have one reference to the definite locations. There is nothing wrong with the two dimensional drawings on page 2 and 5; they just are not oriented in a way that line up with the dimensional drawings without flipping or rotating them. This is a somewhat common practice in electronics diagrams and often cause confusion. Some manufacturers have multiple references by referring to drawings several times to avoid miscommunication. It is important that the two dimensional electrical diagrams line up when rotating or flipping in some way though, if it is not possible then there is an error in the diagram.