Just because I sell something doesn't make me exempt from the legal consequences of my actions prior. If I negligently claim that a product will make you healthier and it cripples you, then you can sue me regardless of whether I still own the product. Similarly, I could be prosecuted for dishonest advertising type offences (which aren't wiped clean simply by selling a business!).
You might be talking about a products liability type claim.
Only an incompetent acquirer would take liability for any latent claims in a target acquiree. Most likely they will get strong warranties from the seller about the existence of claims and rely on their own due diligence to ensure they aren't buying a product which is likely to cripple people in the future.
In 90% of cases the seller will retain liability for incidents which pre-date the sale of their business.