@wolli said:

.... Does anyone know, how this rotation is determined?

As Dave says, this is a known feature.
The sectional rotation that you see is determined by the rotation of subsequent planes determined by pairs of path segments as you go along the path. Hence no rotation when all path segments are in the same plane.