These little holes are a good example of "a feature built into a product so that it can handle unusual or unexpected situations." We don't think about or see these situations in the normal use of the product. For example, if you look at the sheet metal under the hood of your car, you will see little bends in it. Those bends are placed there so that in an accident the front of the car will fold like an accordion and absorb the impact. The bends don't do anything unless a crash occurs, and then they are very important.
With a can of Pam, the lid fits very tightly so that oil won't ooze from the nozzle down the side of the can and onto your shelf. If the manufacturer puts the caps on the cans in New Jersey and then ships the cans to Denver (the "Mile-High City"), a funny thing happens -- the air pressure inside the lid pops the lid right off. So the poor stock boy at the grocery store has to put the lids back on 30 cans before he can put them on the shelf. What a pain!
When the lid was put on the can in New Jersey, the air inside the lid had a certain pressure (the same pressure as the air outside the lid). The outside air pressure in Denver is lower than the air pressure in New Jersey (pressure decreases as elevation increases), so when the can arrives in Denver, the pressure outside the lid is lower than the pressure inside the lid. With this imbalance, the air inside the lid tries to expand and ends up popping the lid off.
By putting a small hole in the lid, the air can exit through the hole, and the lids stay on during shipping!
Here are some interesting links: