For any search where you don't know what you want Google without NPM pages works fine.
For any search where you do know what you want NPM's search function works fine.
There isn't a case where you need Google to interleave pages from the wider internet with pages from NPM. You only think you want that because it's what you're used to, or because you use Google to do searches that you should really do on NPM instead.
Or you're getting a GitHub page with a similar name, or worse, a malicious GitHub page that instructs you to download the npm package you're looking for from a typo squatted version of it.
A github page really isn't what I want at all when asking questions about an npm package except for the fact that I'm used to its code browser, so I tend to click it out of habit.
I don't know, if I want information about something, it seems pretty reasonable that I might do my search for that something.