A friend of mine, who works for a well-known technology giant, recently told me about a Linux guru they interviewed and hired. He was amazing in the interview, and they gave him an offer on the spot. When he started working, however, he constantly turned in sub-par work. A couple of months later, one of the members of the team who had interviewed this guy flew out to where he was working, and discovered that the guy sitting in the cube doing the work was not the guy they had interviewed. It was someone else. The guy went through quite an effort to cheat his way into a job, but when he was discovered, he was immediately fired.
If cheating was my thing, and I really wanted to get a job via nefarious means, so I could worry about my job on a daily basis, how hard would it be to pay someone to write a bunch of Github code for me? Exactly, which is why the request is pretty dumb to start with, I think.
For a bunch of smart people, we engineers sure have a hard time figuring out how to interview people and ascertain their skills.