That quote is often used out of context, as all quotes often are. The full snippet says:
He who can, does. He who cannot, teaches. A learned man is an idler who kills time with study. Beware of his false knowledge: it is more dangerous than ignorance. Activity is the only road to knowledge.
Sometimes, the abbreviated quote has merit. The musician who longs to play for audiences but is terrified to tackle the bear, so he teaches. Julia Cameron calls that the “blocked creative.”
But what of the music teacher who teaches because he longs not for the light of the stage, but the light in the pupil’s eye. There’s merit there, too.
And in yet other cases, one cannot teach without being able to do. Can you even imagine someone trying to teach flight lessons if they could not themselves fly a plane?