So, how a rimfire gun discharges a cartridge is by the firing pin and/or the hammer striking the rim of the cartridge, igniting the primer and sending a spark – again – into the main propellant charge.
That’s just like a centerfire gun of any sort – like a pistol, rifle or shotgun – but here’s what’s relevant about that:
What stops travel of the hammer or firing pin is the rim of the cartridge. Not very far away from the rim, is the rest of the chamber. That tends to be a chunk of metal.
The firing pin or hammer tends to be a little chunk of metal. Often enough, instead of an actual pin, it’s a relatively thin blade of metal that hits the rim of the cartridge.
Since the energy of the firing pin is going into a relatively soft brass case, hitting the cartridge can’t really hurt the firing pin. However, slamming into a steel chamber wall…is going to damage it at some point, if not instantly.
In other words, the thin little firing pin or hammer that’s common to most rimfire guns can’t take the impact on a harder surface and therefore, will break.
Now, there are some exceptions, but you have to put in a bit of work to find out if YOUR rimfire gun is not included.
The only way this isn’t a risk is if the firing pin or hammer of a rimfire gun does not contact any other part of the gun when dry-fired. Unfortunately, since the firing pin or hammer has to contact the rim of the case rather than the center of the case, that’s darn few of them.
The firing pin or hammer of any centerfire gun, however, literally hits nothing but dead space. It’s no big deal to dry fire them at all, unless the firing pin isn’t heat-treated, which is sometimes the case with older guns.
So, that’s the reason you really, really shouldn’t dry fire a rimfire gun.
UNLESS, of course, you put in a snap cap. Then it’s totally fine.