Moment applied causing bending stress in beam

1. The problem statement, all variables and given/known data
From the solution , it's clear that the top part of the beam undergo tension , while the lower part undergo compression .

2. Relevant equations

3. The attempt at a solution
But , i dont understand why it is so . When the moment is applied in the horizontal axis , the structure will slide become like this , right ? ( the top part will be slided into the book )
I cant imagine how the moment applied causing the top part to experience tension , while the lower part experience compression .

You should have learned by now that moments cause bending stresses perpendicular to the plane of the cut, whereas shear stresses act parallel to the plane of the cut. The bending stresses cause stretching of the tension fibers or squeezing of the compression fibers. Tendency of Slippage between fibers is due to longitudinal shearing stresses.