that's because you have drawn perhaps the triangle after creating the rectangle and rotated the triangle to -90°.
The stacking order of elements will dictate the rotation. Send the triangle to the back and try again.
Two other ways to avoid this:
Start with a triangle, that is rotated,
then add a rectangle you will not rotate,
then use the pathfinder to add the two objects.
Or start out with a new rectangle.
Add one path point at it's right edge
and draw out that path point to form the shape you like
with the Direct Selection Tool (the "White Arrow Tool").
1- Select frame shape with Selection tool then rotate 0.
2- Then select again frame shape with Direct selection tool and rotate to -90.
Very good idea, Salah!
So Jessica can reuse the shape that currently does not work for her.