The other side is, that existing users will get pissed at github, because they can't even search anymore without logging in, and sometimes that's a pain (not their pc, public pc, incognito tab, the time needed to do the 2fa, etc.).
Github can still keep the cheap, fast basic search for users not logged in, but they didn't.
This makes no sense. The number of people who use GitHub code search but don’t already have a GitHub account is surely negligible
logged in user ad impression is 8 to 12 usd. anonymous user is .01cent per thousands.