I disagree with you on both counts:
1. Perhaps your university background is different, but I haven't ever had the impression that a particular professor's class is preferred to another due to the first professor's educational pedigree, in undergraduate classes. Such classes often conform to general topics and there is insufficient variability for two professors to directly compete for students.
Undergraduate students bring in the most money but, as I mention above, aren't really involved in selecting one instructor over another; indeed, undergraduates are often taught by graduate students. If the cash-generating undergraduates are cut off from professors, it stands to reason that undergraduates' opinions aren't important in hiring professors.
Graduate courses are, of course, different. First, graduate students often cost money (they often receive a stipend). But getting into graduate school isn't as meritocratic as it may seem, which both relates to the OP's point and to my second disagreement.
2. I don't believe that the OP ever says that graduate schools don't admit students based on merit. Instead, she gives an example of how a strong candidate might prefer a less-prestigious university to a more prestigious one (cost of living).