It's only speculation he didn't know who he was helping (and the source of that is Pinker himself). I find it hard to believe that Pinker had no idea who this was for despite Epstein's reputation, the original press coverage of the case, the fact that Dershowitz was involved (and, unlike Pinker, actually fingered by at least one of the women as a rapist).
Pinker is a great mind. I don't think his guileless version of events is a truthful account. What's most likely: This whole thing was embarrassing for his good friend Alan Dershowitz and his Alma, and if Epstein was found guilty of a lesser charge things wouldn't look so bad. He underestimated the ensuing backlash and claims he was just tossing out free legal advice for a friend.
He certainly knew after the fact that a sweetheart deal was struck with Epstein in part due to his legal input. Regardless, he allowed himself photographed with him and made no attempt to speak-out about the fact that he had no idea he was helping Epstein and in fact when on to tweet about his contributions Dershowitz in 2015.
Again, just bad judgement on the part of Pinker. He's not a monster, "bad guy" or anything, it's just frustrating he's defending elite power.