What makes securing faculty positions difficult?
One of the strange effects of faculty hiring (and graduate admissions) is that offers do not necessarily go to the strongest candidates.  Departments have limited resources to interview, recruit, and hire faculty.  Interviews are expensive; startup packages are really expensive; faculty job offers burn political capital even when they aren't accepted.

So hiring committees make strategic decisions based on the perceived probability that candidates will accept the position.  The University of Southeast North Dakota at Hoople would most likely not interview superstar applicants, because they don't want to waste their time interviewing someone who's "obviously" going to get offers from stronger schools.  As with any self-selection process, this assumption is partly justified and partly Institutional Impostor Syndrome.

So no, selecting an MIT grad is absolutely not a no-brainer for U-Cal-XYZ.

And yes, sometimes reasonable PhD students from very strong schools fail to get faculty jobs, or even interviews, because they don't quite have the research record to get an interview at the best departments, but their pedigree scares off weaker departments.