The 3D shape is sliced parallel to its base. Let's imagine a few more slices are carried out:
As you can see the two visible faces of this shape are a rect angle (1) and a triangle (2). Face 1 is being cut horizontally which means that all the blue lines have the same measure (just imagine you are making a cut that is parallel to one of the rectangle sides). Face 2 is also being cut horizontally but the orange, green and red lines have different sides because face 2 is a triangle so the distance between the vertical side and the inclined side changes. It is also important to note that the angle between faces 1 and 2 is a right angle. There's a face opposite to face 2 that we can't see but we can find its angle with face 1. Since this hidden face is opposite to face 2 then it is parallel to face 2. Then its angle with face 1 is the same as that betwenn faces 1 and 2, it's a right angle. Then the cut give as a side in that face that is opposite to the red side but has its same length. So for now we have three sides and two angles that I'm going to draw:
Where the red and blue sides are those shown in the first picture and the purple side is the one I described before. There's one side missing, the one made when the inclined face of the 3D shape is cut. This fourth side unites the free extremes of the red and purple sides and since these two are parallel and have the same length then the new side is equally large and parallel to the blue one:
Then the 2D shape created is a rectangle.