I’d to laugh at this when I read it.
No, stories do not always have to be logical. That’s one of the freedom of writing and creativity. Every single story doesn’t have to be logical. Some of the best ones aren’t.
But that depends on the story itself rather or not logic plays a major role. It’s would be difficult to write a historical fiction, a thriller, a police detective, or doctor novel without adding some logic or your story will land in the realm of unbelievable.
If it’s not wholly a fantasy, then it’s always best to stay within somewhat boundaries of possibilities, again, unless you’re writing strictly fantasy.
Something like Alice’s Adventures in Wonderland the 1865 novel written by the English author Charles Lutwidge Dodgson under the pseudonym Lewis Carroll, one knows it’s purely fantasy, without logic. It wasn’t meant to make sense in a traditional manner. It’s a metaphorical story, which can mean different things to different people.