Remember, Google didn't buy a product line off etherpad, they bought the whole thing. Normally when a company buys another company they get the whole shebang - including the liabilities. It's done all the time, btw. Otherwise it becomes a quick way to void contracts - which would be shot down in court (equity). Also, companies are bought on a routine basis by buying all the shares - it's one of the common ways of doing a buyout. You bid x per share, which is normally a premium over what it currently is selling for on the market. Pay attention to business news and you'll see it a lot.