That's not entirely the case in Germany. Applicants need to give a lecture which is public. Usually members of the student union will be present and will have a say later within the hiring committee about the quality of teaching.
But I do agree that the ability to produce and procure research is not at all coupled with the ability to teach.