Barometric pressure doesn’t vary much in any one location, maybe half a PSI from min to max. A 1-gallon paint can is maybe 7" across, making a lid with 38 square inches, so that equates to 19 pounds of force. This assumes that you sealed the can at a time when barometric pressure was at its lowest.
If the ambient temp increases from 70F to 87F, this would also increase the pressure by about half a PSI.
Here’s another theory:
When you open the can, you let ambient air into it. This air is devoid of whatever solvent/carrier the paint is made of. Then you seal the can, locking in a pressure that matches ambient.
Now the solvent/carrier in the paint evaporates until the partial pressure of the vapor equals its saturation pressure. This results in a total pressure inside the can that is greater than atmospheric. If the lid is poorly secured and/or large (large lids have more surface area, therefore greater force, per length of perimeter), the increased internal pressure may be enough to pop the lid loose or force a leak.
Once the pressure equilibrates, the vapor pressure inside the can will be lower, but only to a limited degree. You seal the can again, and now since there’s already some solvent vapor present, the new increase in pressure doesn’t have to be as great in order to achieve saturation pressure.
For water (relevant to water-based house paints), the vapor saturation pressure (at room temp) is about half a PSI, so if you’ve opened/sealed the cans in a very dry environment, this could provide an effect comparable to the above two. If you’re dealing with automotive paints, the saturation vapor pressure is much higher, about 2 psi, so you can produce a lot more force to pop a big lid off of a can.
If my theory is correct, then you could perhaps alleviate the incidence of lid-popping by gently setting the lid in place for a few minutes before finally hammering it home. Setting the lid in place without sealing it for a few minutes allows you to corral an air mass that can then become saturated with the paint’s solvent/carrier while maintaining equilibrium with ambient pressure. Once it’s saturated, you can seal the lid tight, after which the can will only be affected by changes in temperature or ambient pressure. (the risk of this method is that after you set the lids in place, you might forget to return later to fully seal them…)