I wish GitHub had decent search functionality.
And this is really the bare minimum. An even better search would e.g. allow searching for identifiers (comments and strings disregarded).
In other words, I agree with you but I also know it is an extremely hard problem to solve at Github's scale.
Git is easy to host, especially now with several good web frontends.