22lr/22mag are entirely different animals than 17hrm. The great debate over cleaning rimfires is generally focused on 22lr which is filthy.
Most 22lr bullets are bare lead or copper washed lead and then coated with wax/lube. A new/clean barrel is soon seasoned with bullet lube, imagine the seasoning on a cast iron pan; kinda, but softer. Barrel fowling tapers off and accuracy is consistent for a long time.
Cleaning a barrel removes that wax seasoning. Even simply changing ammunition can throw it off and it it takes a few shots for accuracy to level off again.
So 22lr bores don't need to be cleaned much. But the bore is not the only part of the barrel that gets dirty.
The crown gets dirty and starts accumulating buildup. Eventually it can effect accuracy.
The chamber gets dirty too, both from bullet lube and from burnt powder residue. Eventually cases start to stick in the chamber and cause malfunctions, like failure to seat properly and failure to extract.
Then there's the face of the barrel/chamber and the face of the slide (semi auto) that slam together. Powder residue can and does build up and can actually damage those dirty faces from repeated smashing into each other with gritty residue between the two surfaces. High count semi autos often have this type of damage that looks a bit like pitting. That same buildup of residue clogs the extractor claw and clogs the recess in the face of the slide so the rim does not seat completely flush on a chambered round. This can also start to effect the firing pin functioning. Use a tooth pic or similar every once in a while to clean out those hard residue deposits.
General gunk inside the action can cause malfunctions, hinder smooth slide operation, cause issues with the feed ramp, and all sorts of other issues.
In short, most folks should keep their chamber and action clean but leave the bore alone. The perfect cleaner is a Hornady One Shot Gun Cleaner, spray it in the action, scrub with a brush, swap down with a Qtip including the chamber, and spray the action again to rinse it off and act as a dry lube. Then spritz the rails to keep them moving freely. It doesn't have to be perfect and in many cases you don't even need to disassemble anything. Just don't use any oil which attracts powder residue and turns it into mud.