So you’re telling me that if, say, Google’s Search algorithm got leaked it wouldn’t seriously hinder their business? There’s definitely cases where leaking a business’ code can be pretty disastrous.
Also the code base is probably so big and esoteric that there is no way to replicate the services without knowledge external to the repo.
You can get bits and parts and it would be disastrous for Google, but you would need 1000 engineers to reverse engineer the source code into some working search engine or what ever service you would want to replicate.
I've been thinking about what if the competitors got hold of my employers code base. I think it would require years of reverse engineering to get anything useful out of it for their product, and that they could just as well put that effort into their product directly without espionage.
Google's search algorithm was public for a long time [0], it's been improved now and more under the curtains, but the answer is no.
Google wins not only by technology, but also by size of the index
[0] https://en.wikipedia.org/wiki/PageRank