Creepage and clearance when using relays
The biggest clue that the part is OK is the UL Recognized component mark (the backwards-looking "RU" symbol with C and US) on the part.

You will have to make sure that your PCB traces keep the necessary creepages and clearances, but the part itself (and the pinouts) are perfectly acceptable per UL and therefore not a cause for concern.

The pinout logic is most likely a function of the physical construction of the part given the form factor, or it could be to make it pin-compatible with some other vendor.