This is my understanding from working with nautral gas harvesting and a really well written avatar the last Airbender fanfic:
There are areas of the earth that are effectively farting at all times.
Some are decaying organic matter into hydrocarbons like crude oil, tar, methane, propane, and natural gas. Most is close enough to the surface to mix with the air and break down within 12 years or so.
Some are decaying radioactive atoms like uranium, thorium, and plutonium. These fart out radon and ultimately helium. Most is close enough to the surface to float to the tippy top of our atmosphere and get blown away by ambient hydrogen in the area defined as space.
Regarding your question: there are Underground salt deposits that will make a perfect airtight seal if the top gets wet even once, then a mix of hydrocarbons and helium build up underneath and are almost indistinguishable from the shale rocks. Mining far enough to open it up then fracking (small explosion of water and sand large enough to keep gaps in shale rock open) is enough to start having a continuous flow from the "well" of these gasses.
He does not get retained in the atmosphere. We just have a lot as a waste byproduct of other activities, but it is scarce and will be scarcer as time goes on.