I used to think it was a slur against teachers, but it isn't. For example: If you are a nurse and you can do a good job, you do. If you are a nurse but is unable to do the job, you teach. There's plenty other jobs that this applies to also.
It has taken me more than 40 years to understand this phrase. I am a little slow aint I.