There are some things that are evidently hardwired into the human brain (I think) but all else is supplied, directly or indirectly, by environment and socialization.
You can't, of course, remember where everything comes from. That would make one well-nigh insane, one would think, to keep track of all the little inputs so they know what kind of context to put the weird three A.M. ideas into.
But it's all connected. The brain has randomizer functions, and makes bizarre associations between things, but GIGO. Unless it's the right kind of garbage and the right kind of randomizer, but still.
I find it necessary for me to keep a mental stickynote/string on all the concepts that go in to my brainmeats that really really bother me for some inexplicable reason, so that I know what they're breeding with and so that I can try and resolve that bothering, break it down into its component pieces -- maybe there's a bit of faulty logic in it, or maybe some part of it contrasts directly with some underlying core belief of mine, so I can't accept the chunk.
I had a moment like that the other day. I was discussing something with Darkside, and I was being irrational about something, and he was reminding me of the irrational perspective, and I just came back and back to the thing, because I was irrationally bothered by it.
My keeping-track mechanism has grown more automatic, over the years. It saves me a lot of mental trouble, being able to track down and resolve things like this quickly. I don't like it when I'm irrational. I can be completely manic and silly, and deliberately make irrational decisions, but I know that everything I do, there is a reason for it, and while it may not be the choices that Earth-humans would make, I can explain my reasons behind most things at most times.