Elaboration on Iddee's response:
Wax moths get their protein for growth primarily from eating the layers of exuviae inside the walls of built combs. [Primarily but not exclusively---they can feed on pollen and even developing larvae too.] The less the combs have been used, the poorer the development of the wax moths.
Sheets of foundation are usually made with well filtered wax and have very little source of protein in them. So the wax moths, attracted to the sheets of foundation, can lay eggs that start developing, but usually don't get very far, thus they may burrow through them a bit but don't cause enough damage to make the foundation worthless.
Recommendation: when I buy boxes of foundation, before putting them aside for long term storage, I first put them in plastic bags and afterwards return them to the boxes. It's amazing how wax moths can find their way into what we see as closed box. The plastic bag is usually an adequate addition to keep them out.