There are two well-established meanings of pop that this is quite close to. Quoting the OED:
colloq. (chiefly N. Amer.). To open or release with a popping sound; spec. to open (a can of drink) with a pop by pulling the tab or ring pull. “Settled now on a sofa in the youth center, popping cans of Busch Bavarian.” — 1976, National Observer (U.S.), 10 Apr. 18/2.
slang. To take (a drug or pill); spec. to swallow or inject (a narcotic drug); to inject (a vein) with a drug. “For him the day‥started when he swallowed the first pill or popped the first vein.” — 1968, M. Woodhouse Rock Baby, ii. 109
They have different origins. Popping a beer came from the sense of making a popping noise, while popping a pill came from inserting it into one’s mouth — both of these being much older usages of pop. But, as in your example, they seem to have recently been converging/generalising somewhat into a single sense: to consume something (especially something that comes in small discrete units, and hence is comparable to pills or cans of drink).
The clearest aspect of this shift is that to pop a beer (or a soda) now often means to drink it, not just to open it. But as your example and others show (google eg
"pop a cookie"), at least some of the time, it can extend to other things as well.