I don't think it's fair to say that ChatGPT has racism and sexism inside. That's a sensationalist take at what's happening. YOU gave it prompts to sort by race and gender, so of course it's going to spit out data to do so