Now google search has a lot of problems, much better competition. But seriously you probably dont understand how it was years ago.
Also I thought that in ML still the best algorhitms win, since all the big companies have money. If someone came and developed a "pagerank-equivalent" for AI that is better than the current algs, customerd would switch quickly since there is no loyalty.
On a side note: Microsoft is playing the game very smart by adding AI to their products what makes you stick to them.
Google won against initially Alta Vista, because they had so much money to buy themselves into each countries interxion to produce faster results. With servers and cheap disks.
The pagerank and more bots approach kept them in front afterwards, until a few years ago when search went downhill due to SEO hacks in this monoculture.
As an anegdote: before google I was asked to show the internet to my grandmother. So I asked her what she wants to search for. She asked me about some author, let's say William Shakespeare - guess what did the other search engine find for me and my grandma: porn...
Certainly not when they won.
They were better. Basic PageRank was better than anything else. And once they figured out advertisement, they kept making it better to seal their dominance.