None of Magic Leap's many problems would have mattered if there was actually a market for the product to sell into. But the market needs a product that's better than any available technology allows today.
The same Hololens 2 - except there Microsoft isn't able to deliver these due to manufacturing issues.
That something isn't selling millions of pieces like an iPhone doesn't mean that there isn't a market for it.
Magic Leap's problems were mostly of their own making - their gizmo wasn't significantly better than Hololens, in many aspects it was actually worse. For ex. the "goggles" form factor limiting spatial awareness - big deal e.g. in factories where a maintenance tech wearing it could get hurt or killed by a moving piece of machinery that they couldn't see.
They have also focused mostly on hype rather then things that actually matter to businesses (given the price and form factor trying to market it to public was a non-starter - Microsoft didn't even attempt that). And, finally - you can't actually buy the gizmo, even if you wanted to - they aren't selling it anywhere except in the US! Unlike Microsoft, which has no such issues.
ML problems was hype, hype and more HYPE. And then under-delivering, the device was in many ways actually worse than the first gen Hololens, despite costing more and coming to the market later.
Oh and also the confused messages straight from the top - is ML a hardware company? A software platform? Services platform? Marketing to professionals? (then why those game demos and not some more pro oriented?) Marketing to retail? (then that price is a non-starter). Etc etc etc ...