Her pupils shrink because the muscles contract. When she opens her eyes and is exposed to the bright light, the muscles in her iris contract, causing her pupils to constrict in order to reduce the amount of light entering her eyes and protect her retina from being overwhelmed by the sudden increase in brightness.