I worked at Yahoo during this time. I said at the time it was so dumb for Microsoft to be wasting so much money on Yahoo and instead they should have bought massive holdings in almost every Silicon Valley company for that money, including Facebook (I think they did invest a little in Facebook). Had they done that instead they would have been worth multiple trillions now.
They really avoided a huge disaster by walking away from Yahoo, so I applaud them.