Investors celebrated after Alphabet Inc.’s Google avoided the worst-case scenario of divesting Chrome in last week’s antitrust ruling, with the stock soaring over 8% after the judge’s decision.