There actually are legal ways to do that… instead of buying the company, you start a new company, and just buy assets of the old company (e.g. phone numbers, web sites, trademarks, customer lists). Seems shady but apparently it’s pretty common.

Doesn't always work. I think J&J tried that with talc powder liability.