One perspective that's missing here is that of the users that are presumably benefitting from the company's product(s). The users would probably prefer that the company keep slogging than that it get acquihired and the "failed" product get killed. I recently read _The One Device_ by Brian Merchant, and I'm reminded of the story, told in that book, about how FingerWorks sold out to Apple. The FingerWorks users got screwed when Apple discontinued FingerWorks product development and put the team to work on developing multitouch for the iPhone instead. Now, the iPhone has several assistive technologies of its own (FingerWorks developed products for people with RSI), but the death of the FingerWorks products was still definitely a loss.
So in my own company, as long as I have the power to do so (I have a cofounder, so it's not entirely my decision), I'll keep slogging rather than shut down a product that is benefitting users.