That packaging is a separate thermal protective layer. Though the outer surface of the shroud may heat up to 2000 degrees Fahrenheit, this separate layer of insulation will prevent the flag itself from experiencing temperatures higher than 180 degrees.

Closeup of flag packaging mounted on Apollo 11 mockup with outer case pulled back, MSC, July 1969. Courtesy NASA.

 

     9 of 12