That’s true, which is often a reason that people don't buy failing companies
at all, instead buying selected assets (including things like the trademarks and brands) and letting the actual original company go out of business.
This can happen in bankruptcy, particularly, but that's not the only way it happens.