They are the ones who may have struggled with (or even failed) a concept or subject but never gave up and put in the effort which saw them overcoming the hurdle.
Because they know what it is like to go from failure to success, they can make many more success stories in the lives of their students.
Someone who never really struggled with learning will not make a good teacher.
(The same goes for good parenting also. The best parents are not necessarily the righteous ones but those who struggled and then make their life better by putting in the effort. They will be better teachers to their children or others that they are in charge of.)