1. Search is just not hidden in GUI for users, who are not logged in, but these users can still perform search as other people mentioned in comments
2. Github Search is definitely cached
3. It has nothing to do with DDOS. Do you expect Google requires you to sign in in order to prevent DDOS? Moreover, unless Github is totally wall-gardened, there are tons of ways to DDOS the service. I suggest you need to learn how DDOS actually works.