Yes, id does have to do with the rimfire mechanism
The firing pin hits the rim of the round, which is supported by the edge of the chamber. With no round in place to absorb the impact, many guns will allow the firing pin to hit the steel at the edge of the chamber.
Now, the odds of any damage to the gun from a (relatively) small number of hits is small. Snapping the firing pin before extended storage (so no springs are compressed) usually will not harm the gun.
But large amounts of snapping, by dry firing as practice can have an effect. The firing pin may be damaged, and in exptreme cases, the edge of the chamber is "peened", leaving a burr and a dimple in the steel. If the burr is large enough, it can prevent the chambered round from fully seating, or worst possible case, in a semi auto, a burr on the edge of the chamber could act as a firing pin, firing the round as the bolt chambers it. This is quite unlikely (I have never heard of a real case of it happening), but it is not outside the realm of possibility.
What is much more likely is that the (dent, dimple, etc.) caused by the firing pin means that right under where the pin hits the rim of the round, there is no steel to support it. Since the rimfire round required the primer compound inside the hollow rim to be crushed (between the firing pin and the barrel, the most likely result is erratic ignition of rounds. Possible that the gun will no longer reliably fire.
.22s have been made by a lot of people, for a long time. Springs made in the early years of the last century (and before) are often not as well made (material, heat treatment, eyc.) and could take a "set" or even break if left compressed for long periods of time. All the old timers were taught as children when they began shooting, NEVER leave the gun cocked when you put it away. So we learned to snap the firing pin (dry fire) before storage. And the small number of times you do this doesn't hurt the gun, normally.
Center fire guns do not have the problem of the firing pin hitting the barrel when dry fired. Dry firing is encouraged as training, with certain guns.
Other gun designs are not suitable for extended dry firing (training) because of the stress on the firing pin without any cartridge in place. Dry firing of these kinds of guns should only by done with a "snap cap" in place.
Not sure if your center fire can be safely dry fired without snap caps? Check with the manufacturer. Some guns can be, I have an owners manual for a New Model Ruger Blackhawk that says dry firing will not harm the gun. If your manual doesn't say it is ok, then assume it isn't, and always use snap caps for dry fire training.
Hope this helps.