There's no way they didn't expect some backlash on this. So I think it's partly for the marketing gimmick. I'm sure there are people at Github tho who really think they're making something valuable unfortunately. Sadly, what they're not aware of is that they've become part of the experiment themselves.
It's like expecting that an AI trained on Shakespeare novels would be able to "help" a writer write Shakespeare-like novels. Sure, they might get something that might fool some people, but are they a writer? I think software is a lot more like "writing" than it is like "building".
What mostly annoys me is that this is a win-win for github regardless of the outcome. If people buy into it (even for just a while, and it currently seems like some really smart people are buying into it) they'll carve a huge piece of a new market. If it fails, they'll make it seem like an experiment into the whole ethical gray area of what should and shouldn't be used for training, and that they just wanted to draw attention to it.