This is true for the "raw", pre-trained causal language models that are only trained on predicting the next token.
All these chat models have an additional (or several) fine-tuning steps where they see these kind of "instruction/question" followed by an answer.
Search for RLHF (reinforcement learning with human feedback) and instruction fine-tuning