It's not hardcoded. ChatGPT is GPT3+reinforcement learning to align with human sentiment. I think the reaction to the hypothetical is actually proof that refusing to say a slur to save millions is actually aligned with our values