Yoga is an intensively therapeutic practice. You are contracting, stretching your muscles, Flushing your entire body with fresh, oxygenated blood, increasing the range of motion of your joints, strengthening your bones by working against gravity and regulating your immune, lympathic and endrocrine systems, and calming your central nervous system.
The heat helps to enhance some of the benefits of yoga by warming up the muscles, and increasing circulation. The tourniquet effect (ask your teacher) becomes more effective. A benefit that comes with it too is that it can help some students who have very limited mobility get the same cardiovascular benefits as other students.