Richard Garner, in his interesting book Beyond Morality, discusses what he calls the genetic fallacy fallacy.
We all know the genetic fallacy, of course: the idea that a belief is not proved to be false simply because it was formed by a method that is unreliable. Thus, I may come to the conclusion that God exists and loves me, based on my wish that this were so and because I would be comforted by having a heavenly father to give me love for as long as I need it - and in all the circumstances of my life. Love from such a being might seem of far greater value to me than love from the merely mortal (and perhaps sometimes fickle) beings whom I encounter here on Earth. Perhaps, when things are going well for me, it does seem as if I am blessed with the love of such a powerful and benevolent being.
That is hardly a reliable way to reach any conclusions about the existence of a deity, much less about that deity's attitude to me. Yet, the fact that I may have reached my conclusions in such an unreliable way does not demonstrate that they are actually wrong. My beliefs might just happen to be true. They might even have some independent compelling justification ... perhaps something I'm not even aware of.
But that does not mean that the historical source of a belief is never relevant to whether we should accept it. In the absence of some independent evidence and argument in favour of a belief, surely we have less reason to accept it if we can give a debunking explanation of how someone came to adopt it. As Garner says, if someone's ability to form reliable beliefs on the subject concerned was impeded - e.g. "by drugs, madness, fear, or ignorance" - knowledge of the fact is going to affect the reliability of the person's testimony.
Much of the commonsense wisdom passed down through the centuries and millennia is, at least, the product of ignorance, and often of wishful thinking, or of our attraction to ideas that simply sound noble or "catchy" in some way. When we encounter ideas that are widely held, but with no evidentiary justification in sight and plenty of psychological explanation as to why the world might have looked the way it did to the people concerned, then we have every reason to be sceptical.