Following path cause a lose of rotation axis I have simplified the scenario on bellow picture:

I have line Bezier Curve which I'm using as a path for camera to move along. When camera is on top, it is pointing down, and when it is coming down, I have turned it 90 degrees to see sight from the box.
But when camera is on that position you see I'm unable to rotate it using X-axis.

On the following picture I have used X-axis to rotate the camera landscape, but as you can see from the picture, it turns over the Z-axis:



When I'm using Z-axis to rotate, it does that as expected:


When the camera is on top, it rotates correctly. What I do not know on this?
This strange behavior is called gimbal lock. It is caused by the interdependency of the three rotation axes.
When the middle axis (Y in the case of XYZ rotation) is set to any value which results in a ±90° rotation, the first axis is aligned with the last. At this point, a change to the first or last axial rotation can only rotate around the last axis (Z in the case of XYZ).
A good example can be seen in this gif by Peyman Massoudi:

Notice how the red X ring is rotated to the blue Z ring.
The solution is to use axis-angle, quaternion or a different rotation order (e.g. XZY, ZXY, YZX,...) to rotate the object.