Why is gum wrapped in foil paper?

I am talking about the very innner layer, the wrapper that actually touches the gum itself. Only the outside is foil, the inside looks like regular paper. Why have the outside of it foil? Thank you very much.

To keep it from drying out

Have you ever dropped a piece of gum on the floor of a baseball dugout??
You can still eat it thanks to the foil.

Presumably to improve freshness while avoiding tack.

Although it doesn’t explicitly say so, Wrigley’s Site says, “To be at its best, chewing gum must be fresh, and the packaging materials are instrumental in protecting the quality of the product.”

Just a WAG, but:

Paper on the inside would help prevent humidity from breaking down the gum and causing it to be tacky. An impervious foil on the outside would help seal in freshness.

So you have something to save it in to finish chewing later.