Much like humans, AI is taught how to respond/think. So it's up to the creator how it processes the info, so unlike humans it can't go against the creators design. Now ChatGPT isn't really meant to be used in this way though.