Contrary to popular belief it wasn't the Dreamcast itself that was the main reason for SEGA leaving the hardware business. But I'm not the first here to say that it seems.
Dreamcast was selling decently actually, because it got to those 9m in under two years. Similarly, Gamecube was also selling well at first, but was atrocious in the later half of it's life. WiiU being behind both means little, it's the legs that count. There are and were many systems selling behind both, some indeed ended up failures, some didn't. The difference is, Nintendo makes money compared to SEGA at the time in this case, so they can survive a mediocre generation here and there. It isn't exactly ideal of course, but it is what it is and all we can do is wait to see how this generation ends.