I have no special knowledge about ChatGPT but short answer is likely that this behavior was rewarded in its training. Training involves humans evaluating output and rating whether it's a good response to the prompt. 1/