It's caused by the lookAt()-call of the camera. The lookAt() ensures that you look at the specified point but due to the way it works, it doesn't ensure that you do so in the specific orientation. There are extreme cases, where it flips...which is waht you see here.
However, i don't think that the lookAt() is even necessary in your case. I haven't tried it, but judging from the way the little box moves around the larger one, i would say that the outcome will look the same when using the align only. If not, maybe a fixed rotation around X with 90 degrees or something will make the camera face into the right direction.