First, one of the main reasons search algos are kept secret is that revealing them runs the risk of turning the index into a spammer's paradise. If there's an open source algo then spammers will know exactly which buttons to push in order to dominate the search results, in fact they might even be able to build a piece of software that automatically adjusts spam pages to suit the latest releases of the algo.
Second, we have to be careful here to distinguish between what's control and what's just popularity.
MS controls the desktop because compatibility issues force many existing users (especially businesses) to continue with Windows. Leaving Windows means having to re-buy software and re-train staff (or yourself) in using the new OS, as well as migrate any data and (with businesses) make sure the new OS works with the rest of a company's infrastructure.
Google doesn't control search because users could use any search engine they want, there's absolutely no penalty for using (for example) Yahoo instead of Google. You can switch from one to the other or somewhere completely different at no cost to yourself. It just so happens that most people choose to stick with Google, but there's nothing to keep them there in the way there is with proprietary OSes.