D&D's not in much danger of going out of business from trying this stuff. In fact, it's possible that D&D's brand is of more value than D&D's TTRPG specifically (given the big "diaspora" that doesn't actively play but fondly regards Gygax's creation), and if so, it makes sense to try to diversify the brand -- if you've maxed out one revenue stream, it's time to explore others. Get the former players to buy a movie ticket or a novel.
Also, past failures are necessary for future success. Iteration -- improving on past processes to avoid previous mistakes -- is the way quality work is produced. It's only a problem if you repeat the same mistakes -- in D&D's case, the mistakes have pretty typically been mismanagement from the outset leading to low-quality product.
If they can stop that, they can get better.
I think it's also worth noting, from a business standpoint, D&D is a much more solid product than Mtg.
Magic the Gathering suffers from one critical flaw, it has a finite number of variables. You have a finite number of phases, finite number of card types, finite range of power/toughness, finite number of possible targets. At some point, they'll have exhausted the number of viable possibilities. They've already had to deal with this, it is what caused the need for equipment and planeswalkers, and they've already had to treat the player himself as a game target even after the introduction of those things. Heck, they've also already had to go to flip cards as well. They're running out of design space.
At some unknown point (I'm *not* doing that math!), Magic the Gathering is going to reach a stage where it is just reprinting the same things endlessly. I don't think anyone can predict if it will be viable after that point.
D&D doesn't suffer those flaws, it is completely open ended and literally allows for an infinite number of arbitrary variables. Over time, assuming no cultural shift that makes those types of games unmarketable, D&D will outlive Mtg.
It is also worth repeating what others have said, the brand awareness for D&D is ridiculously high, and the right idea with the right team could make it a blockbuster product on the movie screen, TV, books, and/or video games. D&D's potential is limitless.
Which is exactly why Hasbro's going after the rights to movies, and why they fought to get the video game rights back.