For example, I used to work for a solar power company that would install panels on the roofs of big box stores and then sell the power to the stores below grid prices. This company did not manufacture panels -- they bought them at market rate from various suppliers.
The company got acquired by a major silicon wafer manufacturer. One of the things this wafer company made were solar panels -- boom, vertical integration. What a win, right? Well, as it turned out, after about a year, their competitors were able to bring their panel prices down whereas the acquiring company moved a bit more slowly. Thus the wafer company became an albatross around the solar power company's neck. They had to use the parent company's panels, instead of their more cost-effective competitors, and ended up no longer being competitive in the market.
So vertical integration can and often does make sense, but it comes with a loss of agility, and sometimes being nimble is more important.
In your ancedote the buying company seems to be benefit with increased sales for a non competitive product. Ofcourse they are doing at the expense of the eroding target , but they are deriving value not the way you see it perhaps or the best possible one but value nonetheless.
Somewhere, you're drawing the line between what you build in-house and what you outsource. Where to draw the line depends on many factors. There's definitely no "right" place, such as never using cloud resources.