There are editors and publishers who take that precept as literal writing law. They have a needle-point rendition hanging on their wall, and gesture to it when discussing manuscripts with authors.
They are, of course, far too literal and narrow of vision.
People who cling to the literal rule would apparently wheel a wood-chipper into a bookstore and, beginning with the science fiction and fantasy section, work their way thru all the genres of westerns, mysteries, horror and so on, heaving every book into the hopper until nothing but retellings of “Death of a Salesman” remained. Oh, so treasured would be the books written by former skydiving firefighter spies who could turn a decent phrase. All the other books would come from people like us, with generally mundane work resumes. Yawn.
The loophole lies in the word “know”. Literalists take it to mean “what you’ve smelled with your own nose, seen with your own eyes, what you’ve cried over, what you’ve laughed at”. Since we do have all those examples of fiction on the shelves, a larger number of people understand “know” also means “what you’ve learned thru intense research”. As the story goes sailing off to Barsoom or Middle Earth, the research is buoyed up on a surging sea of imagination. (Or, the dinghy of imagination must be buoyed up on the sparkling lake of research. That might be more accurate.) Studying, reading, interviews and collating all that new information is now what “you know”.
Perhaps that is the new definition of “mainstream fiction” - the easier it is to research and interview for facts to fill in the gaps in the author’s personal knowledge, the more “mainstream”. The genre ripples outwards, probably requiring the author to leave their social circle of contacts to find police detectives, ranchers or combat veterans to interview, or to find credible books written by same. Further yet, now finding books and people who know the profession as it was a generation or two generations ago. And further back into history means the interviews are now with historians, and then archaeologists and palaeontologists. Now it’s bits and pieces that must stitched together by extrapolation and imagination. Astrophysicists and astronomers and chemists provide facts and their own imaginations and speculations alongside your own. Finally, you’re in the heady genre realm of “making it plausible to the reader”, because nobody knows for sure.
That “plausibility” is still the slender link back to “write what you know”. Too many lazy authors think “It’s a scene where a dragon is talking to a little manlike creature about a magic ring”…why do I have to care a sniff about “research”?? Only if you want to write a compelling story of any merit.
How far afield have you gone in your writings? When did personal experiences need to be supplemented by a goodly portion of research?