Because a mystery has to exist before you start solving it.
This might be true for actual detectives in the real world. For instance, events stand in causal relations to one another, and those unfold through time via various sorts of physical and social processes.
Why is it true for a fiction, though? An author can establish clues, and things that they point to, without everything that is pointed to being known when the first clues are presented.
This is a special case of the general principle that the writing of a fiction - as a causal process - need not be correlative to the causal processes that are imagined within that fiction.
And the same point can actually generalise beyond fictions, to other games. For instance, it would be possible to do a treasure hunt at a children's party, where each clue is placed just in time, so that when the children have solved the previous clue they are able to find the newly-placed clue that the previous clue points them to. But there is no need to have the final piece of the treasure hunt in place until the final clue is written and placed.
Serial fiction is often written similarly.
And of course there a matters of degree. It is possible, for instance, in a RPG to establish the sense of a
conspiracy, which the players become aware of and begin to penetrate, without every detail of the conspiracy or its participants being known from the outset.
A fairly well-known example of this is found in B2 Keep on the Borderlands. The write-up includes a chaotic priest in the Keep, who pretends to be trustworthy; and a chaos cult in the Caves. Is the priest related to the cult? The module doesn't say. A GM might make that link during the course of play, perhaps in response to the players, via their play, making it a salient question. This wouldn't preclude the players from (in the fiction, as their PCs) penetrating a chaotic conspiracy to bring down the Keep.