I've run into that problem when blocks/ships aren't all pointing the same direction. I'll try to draw a picture here in a sec, but to ensure I don't run into the problem I do this; on the mother ship, the turret axis block's arrows don't actually matter as far as I know, but I always have them facing forwards, towards the bow of the ship. On the turret base (horizontal axis) I place the rail docker that will connect to the mother ship facing the bow of the turret, so pointing out ahead of the core. When it lines up with the axis on the mother ship the base ends up pointing towards the bow, so from the core of the turret base in flight mode I'm facing the direction the arrows on the dock and axis are pointing. I do the same for the barrel: the arrows on the vertical axis block I point forwards, towards the bow of the base, and the docker on the barrel is pointing to the bow of the barrel piece, so that once connected, the view from the core of the barrel in flight mode is showing me the bow of my turret base, and the parent ship.
Granted, you could be facing a different problem, but mismatched arrows is the only reason I known of that would cause the two pieces to rotate independently.
Also, to answer the previous question; to "defeat" a pirate station, you have to blow up the faction module. Once destroyed the station will revert to neutral and also become "decayed." To do it efficiently, you'd want to know where precisely the faction block is. You could practice in single player, like blow a hole in the station, enter, and scope it out until you've found it. Or you could just nuke the entire thing, that works just as well, and you wouldn't get anything out of the station anyway.