谁知道 (+ [question])?
[what was expected],谁知道 + [what happened]
谁知道 as a reply means nobody can say – least of all the speaker. It is "who knows?", often with a shrug, and 谁知道呢 is the same with 呢 added.
It is a statement shaped like a question, so nobody answers it.
In a story, 谁知道 opens the clause that overturns what was expected: "but then, to everyone's surprise". The first clause sets up the plan or the belief; 谁知道 brings the twist.
In writing, the shorter 谁知 does the same job.
Neither use wants an answer. The surprise use needs something before it to overturn; on its own it is the "who knows" sense.