Her pupils shrink because the muscles contract.
When she opens her eyes in a brightly lit room, the muscles of the iris contract in response to the increased light intensity, causing the pupils to constrict (shrink). This is a protective reflex to limit the amount of light entering the eye and helps improve visual acuity in bright conditions.