Berkshire Hathaway Inc. overpaid for part of venerable food giant Kraft Heinz Co. and failed to realize the potential of Amazon.com Inc., snapping up stock in the internet retailer only after it had already risen by thousands of percent.