First Microsoft has plenty of in house studios, and many other studios they work with as wel. Sony has many as well, but just like MS lot of their big titles come from companies they don't own like Insomniac (Ratchet/Resistance) and Suckerpunch (Infamous).
Why would Microsoft want to buy epic or valve? it's just not for games folks. Microsoft would not only make money off Epics games, but also because of leasing out the Unreal Engine, and other things they do. If they bought Valve, that would mean owning Steam which is the biggest game distribution system on the internet. If they bought any bigger studios those would be the two best investments.