rotate part

Hi,

does anyone know why origin of rotation of a part is somewhere randmly when I try to rotate a part that was added in piping. When I rotate within pipe-sketch editing it throws the part somewhere xxx and the sketch is broken and C-points are connected with yellow-dotted lines, however X-Y-Z rotating is aligned correctly with the part. If I rotate it outside of sketch-edit it X-Y-Z coordinate system is based on global coordinate system and rotating point of the part is somewhere random. Why is that?

SolidworksRouting