Because he didn’t want to lose the young left vote to the Greens. Like racism, he only pretends to care about it if there are votes in it for him and then he drops any pretensions, once he feels he was won or no longer feels the need for a certain demographic.
Most on the left realise that while the EU is very far from perfect, there is no realistic prospect of advancing left of centre politics through Brexit. In fact, the opposite will happen.
As for Corbyn, whether you support him or not, he was leading protests against racists before he was even an MP. To suggest that he doesn’t care deeply about it is to disregard a lifetime of evidence, in favour of unsupported beliefs.