The Areas of a Parallelogram and a Rectangle with the Same Base and Height Are Equal

Why are the formulas for the area of a parallelogram and the area of a rectangle the same? Move the slider from left to right to see the parallelogram dissected and the pieces reassembled in the form of a rectangle.