In my experience some of the best courses in my college are taught not by “professors” but by “lecturers.” The distinction is that professors need to do research and teach, so they necessarily have divided focus. But lecturers only have teaching duty, are not tenured, so they are focused on teaching.
I've long argued that lecturer positions should also be tenure track, depending on metrics about effective education rather than research. Being taught by a researcher is overrated at the undergrad level. I've had lots of shitty courses taught by great researchers.