Because he worked for a major investment bank.
It's irrelevant that it was modified open source code. Wouldn't make any difference.
As a dev employee he simply doesn't get to choose what is and is not proprietary to GS. That decision cannot be made without the involvement of compliance and legal.
And he would have known that. No question.
So, even if he didn't attempt to cover his tracks (which it sounds like he did) he performed an illegal act.
Obviously, without actually knowing what code was taken it's impossible to vet his assertion that it was useless code. It could well be (it's entirely plausible that he just wanted to give back extensions to FOSS code). But, unless GS had explicitly licensed that code otherwise (clearly they hadn't) or he had an agreement with GS that he owned the code (clearly he hadn't) he stole the code belonging to his employer.