What’s the real reason for the aluminum foil inside the cigarette packs?

Tobacco is dried, but if dried in excess, it changes taste and smell and the burning speed is different, etc.

By covering the inside of a pack with foil, it helps create a better environment to prevent moisture from leaving the pack and prolonging it’s shelf life.