Eventually, yes. But many people don't like hearing that the vast majority of them, the users, didn't want to pay for the operating costs of a global search engine when the web got popular. Neither as customers of a company, nor via government spending as a public service, and definitely not through donations.
Hence, given the economic system we live in, the people running search engines had to find some means of funding, which turned out to be selling their users' data and serving them ads. Once they had gone down that path the rest became more or less inevitable.