MUI v5 absolutely supported React 17 though. Unless you're thinking of React 16, which hadn't had updates for almost a year when MUI v5 released.
My point still stands that having a UI library like MUI deeply ingrained into your app can cause dependency and other issues like this. The speed you get upfront can bite you if you don’t plan carefully. Sure there are steps we could have taken to avoid such a mess. But that’s not how things often work out.