What's the point of the lid on the beer stein?

What's the point of the lid on the beer stein?

Today they're largely just traditional. However, originally they helped:
See the following article on Stein Lids for more detail.
The steins with their lids seem to have come about as a result of the bubonic plague to serve as sanitary measure and thus keep flies and other insects (fleas) out of the beer.
From about 1340 until 1380, a bubonic plague, or Black Death, killed more than 25 million Europeans! As horrible as this historic event was, it prompted tremendous progress for civilization. And, of interest here, it is also responsible for the origin of the beer stein.
Recall from above that the distinction between a mug and a stein is the hinged lid. This lid was originally conceived entirely as a sanitary measure. During the summers of the late 1400s, hoards of little flies frequently invaded Central Europe. By the early 1500s, several principalities in what is now Germany had passed laws requiring that all food and beverage containers be covered to protect consumers against these dirty insects. The common mug also had to be covered, and this was accomplished by adding a hinged lid with a thumblift. This ingenious invention was soon used to cover all German beverage containers while still allowing them to be used with one hand. - A Brief History of Beer Steins.
For more information one should read The Beer Stein Book: A 400 Year History.
Beer with hops will get skunky shortly after exposure to sun light. Exposure of about 15 seconds and you can smell the change start if you hold it to your nose in bright sun light. I have one and use it during outdoor barbecues.
My Austrian father-in-law tells me that they're also handy for keeping ashes out of your beer. I don't smoke, so that had never really occurred to me until he mentioned it.
I believe the lid was also used during the Revolutionary War to keep the Kings naval soldiers from throwing a British coin into the beer of an unsuspecting drunk colonist in a tavern. Legend has it that once the ale was consumed, the remaining coin would signify that the owner of the stein would be incriminated by default, to the loyalty of the King. He would then be immediately drafted into the Naval Army of the King. Consequently, the need for a glass bottom to the stein was adopted as a precaution for colonists to be able to see the naval officers by simply lifting up the stein and prevent capture..
I visited Bavaria last November and noticed how comfortable the people were outdoors. Maybe they used the lids to keep the snow from watering down their beer. I think it’s the best!
