The practice is a holdover from blackpowder and corrosive primers, when not cleaning a fired gun could cause serious damage. Unless you were or are a grunt or groundpounder, you probably haven't seen a seriously dirty weapon.
I don't think the auto's fail from dirt. They fail because they are dry! Modern lube melts carbon fouling, and flushes out grit and dirt. So unless you have enough crap to obstruct the barrel, hit it with some lube and off you go.
More guns get screwed up by tyros cleaning them!