As per his message, it wasn't just the code of conduct. It was also their partnership with Outreachy which he sees as a sexist and racist organization. He doesn't want to contribute code to a project he sees furthering those goals, sounds fair enough.
As far as objecting to CoCs, a lot of people don't like them because they've historically opened the door to non-developers coming in an usurping actual contributing developers and shifting the project focus from something technical to something political.