Grok does try to prevent it. They even publicly publish their safety prompt. It clearly shows they have disallowed the system from assisting with queries that create child sexual abuse material.
The fact that users have found ways to hack around this is not evidence of X committing a crime.
https://github.com/xai-org/grok-prompts/blob/main/grok_4_saf...