Thanks to all the energy and protein stored up during the larva phase, the pupa is physiologically self-sufficient and lives off the nutrients it consumed as a caterpillar.
Those hormones tell cells to activate digestive enzymes to break apart the cell's proteins and other parts, and the pupa recycles this protein to fuel the rest of metamorphosis.