Even if it was something that largely happened inside peoples heads what happened in their heads can still be very real. But the historical events, people and places we know are real people, events and places in their historical context as they are described. When you get to Genesis and other stories that's some level of spiritual portrayed in parable and dream visions and that kind of thing, it's not a literal account of how the Earth was formed and life evolved but it all ties in.
Come all ye faithful joyful and triumphant.