The word you may encounter is "expensive." Just from interacting with consumer items that have such seals, they are typically placed where there is a readily accessible surface.
I can imagine a plunger device with a vacuum that holds the foil in place, moves into the cylinder to the stop, and then uses a heater or ultrasonic welder to melt the plastic layer on the aluminum.
If the foil is held with cold adhesive, then it probably requires special processing to place the adhesive on the rim of either the cylinder or the edge of the foil.