In some fields (maybe not mathematics) the graduate students could spend more time doing original research, assisted by teams of undergrads. That would likely make for a more productive learning experience than traditional homework assignments.
It’s an economic issue. Doing original research is not generating value for the institution, so they wouldn’t get paid. In fact, grad students are lucky they aren’t being asked to pay extra to be provided with research topics and lab time to pursue them. Maybe that’s another step in the monetization of higher education.
Research tends to be deep but narrow - more like an internship than an undergraduate semester; courses can focus on teaching the fundamentals and background material in a broader and more systematic way.