I see this narrative parroted a lot but more than likely Dreamcast (and it's piracy) had very little to do with sega's exit from the hardware market.
Sega, the company, was already hanging on by the thread by a time the Dreamcast launched since they'd already been in massive debt at that point from previously launching and abandoning hardware projects in quick succession such as the Sega CD that 32x and the Saturn. Also, If I remember correctly this was during a recession in Japan. Around this time Sega was already looking at several companies to sell to.