The issue with the python docs for this search is that it takes me to “built-in types”, and starts off with things totally irrelevant to what I want. I now have to go searching for string, then find the built-in method replace. Meanwhile, the other tutorial-esque websites almost all show an example of str.replace above the fold. If you’re Google and you’re trying to get people information faster, you’re going to promote the result that has more people not coming back to the search result page afterwards because it was hard to find the answer on that result.
I find this especially useful since I often otherwise find myself typing site:python.org (or similar things, like if I just want to see the MDN page instead of going through w3schools or blog posts for examples).
edit: in the particular example for str.replace, I found it buried in the results for "py replace", at the top of "py str.replace" (helps if you know what Python calls the type) and basically nowhere for "py string replace".