object flips while snapping to another object with align rotation, using face snapping
If you applied the rotation, then this is working as expected. Transform snapping will align the transformed object's local Z axis to the normal of the face to which the object is snapped.

To visualize where the object's local axes are, set the Transform orientation to Local in 3D view > Header:



Since your object's local Z is aligned to the world Z, this means that the local Z is aligned with one of the small sides of the object:


Note the direction of the blue arrow, which is indicating the object's local Z axis.

If you use an object with a local Z axis pointing out of the large side, then it works as desired:



To rotate the object's coordinates without changing the geometry, see Is there a way to rotate the origin without rotating the geometry? and Set rotation values without applying them.