When docking to a station with an entity you will get forced into the stations alignment and out of alignment and gravity of the docked entity.
to illustrate:
to reproduce
- setup a station with a dock upside down on the underside
- dock a taller ship to that dock and get into gravity and or alignment at the end of that ship
- if you not already got reoriented move toward the station
- at one point you will be switched to the station orientation