Well, Gaurav, at first glance your thought process seems sound and logical; for many schools that focus exclusively on teaching, you may be absolutely right. However, the reality is that, at a top research institution like Wharton, faculty are chosen also for their exceptional knowledge and expertise. Thus, Wharton is able to field faculty who are tops in almost all disciplines even if the MBA student body is not pursuing fields evenly across all those disciplines.
While many - perhaps most - courses will be created to cater to students in particular, there other courses that some faculty simply wish to teach which are better suited for the few who do share their areas of interest (e.g. - HR/OB).
Keep in mind, also, that the faculty teach not only MBAs, but also doctoral students who may have different areas of interest than most MBAs. There are OB/HR PhD students at Wharton and they need someone to teach them, right? There is no reason to believe that, with a little diligence and creativity, you could not also take courses with the same professors. This is certainly feasible through Independent Study Projects, at the very least.
In short, your claim is generally applicable...just not necessarily to Wharton, specifically.
Furthermore, note that there are no faculty who teach "consulting." There are faculty members who specialize in areas like Strategic Management which are more relevant to what most people think of as "consulting," but there is no "consulting" discipline per se. There is thus some degree of independence between the career objectives of most Wharton MBA graduates and the breadth of academia covered by Wharton faculty.
-Victor