Why is the solar cooker box covered with a glass sheet?

When sunlight falls over the solar cooker top, the sun rays pass through the glass sheet cover and get absorbed inside the cooker box.

This glass sheet covers does not allow the solar energy to flow out in the form of radiant heat. Thus it traps more and more heat rays of the sun thereby producing greenhouse effect. That is why glass lid is used in the solar cooker.