When writing it's easy to rely on what you already 'know' as fact - but it can be dangerous to do so. As we'll see it's not just a problem for non-fiction writers.
Having said that, it is particularly dangerous when writing on a subject like science. There are several scientific 'facts' and explanations that you will still see regularly referred to that were binned some time ago. A couple of years ago, I was writing a book on science for primary school teachers (Getting Science) and initially relied on a fascinating 'fact' that was tucked away in my memory, that despite appearances, glass was a liquid, not a solid, at room temperature. The evidence usually given for this is that medieval windows are thicker at the bottom than the top, because over the years the glass has very gradually run down.
Unfortunately it's now known that this isn't true. Those medieval windows are thicker at the bottom because they weren't very good at making perfectly flat glass. Sensibly, when they put an uneven pane in place, they put the thicker part at the bottom, as that would be more stable. Yet very recently I have reviewed a book by a respected scientist who repeated the 'glass is a liquid' myth, presumably because he too was relying on memory.
Another example of this is the explanation of how we see a moving image when we watch a movie or TV, even though it actually comprises a sequence of still pictures. When I was writing my biography of moving picture pioneer Eadweard Muybridge, I initially relied on memory and wrote about persistence of vision. It was only later, when I researched in more detail, that I found out this was a Victorian idea with no scientific basis, bearing no resemblance to the way this effect happens. Even so, to this day, you will find persistence of vision given as an explanation in many places.
It might seem this is purely a problem for non-fiction writers. After all, writing fiction we are creating art. It doesn't have to reflect reality. And to an extent this is true. Write about a fictional location, and you can do whatever you like. However, if you do write about real places in fiction, I believe it is only fair to your readers to get as much right as possible.
One example of this I have seen a couple of times is in crime novels, referring to the blindfold statue of justice on top of the Central Criminal Courts (the Old Bailey) in London. The problem is that this statue of justice isn't blindfolded. Some are, it's true. But this, probably the most famous such statue in the world, isn't. Get something like this wrong and it will irritate and nag at any reader who knows the truth. I believe it's better, if possible, to get it right.