google is competing with a different offering. with a pixel you get google's ecosystem. apple is also not neccesarily top dog in performance (maybe they are - havne't checked lately), nobody buys an iphone because it ranks highly in benchmarks. thats some nerd nonsense that 0.1% of the audience seriously cares about.
for google, pushing 3rd parties out of the supply chain gives them a ton of security and stability concerning pricing and budgeting. its a smart long term move, and i think the industry is going to continue to push towards consolidation and in-housing.