"If the writers were free to deviate from facts, then why were they not also free to deviate in spiritual truth?"
A very good question.
God utilized the literary genres that human writers used, the human knowledge that they had, to reveal to mankind what HE wanted to tell man. Thus, the Bible, while having historical writings, is not MEANT to be a historical piece of work. It is a theological work with a historical background. Even the historical writings are done with a theological spin or interpretation on them. "Why did Jerusalem get overrun by the Babylonians?" Because the Jews had sinned - NOT because Babylon was more powerful militarily. Rather than worry about the human shell of the Scriptures, we should look to God's intent of the message.
Another example is "Was the earth created in 6 days?" It depends on whether one takes the inspired writer's litarary genre as a scientific tract, or as a literary work of art that conveys the message that God wanted to reveal - that He is the creator of the universe who loves the pinnacle of His visible creation, mankind.
In the end, the Scriptures are inerrant, NOT because EVERY piece of information is absolutely historically accurate, but because EVERYTHING that God wanted to tell mankind is infallible. We don't presume that God was trying to write ancient Jewish history - but Jewish theological development and God's actions among His people. THIS is inerrant. Through the community and the presence of the Holy Spirit, the Sacred Scriptures help convey God's Word for the people of TODAY. Thus, the Book, in the hands of the community, continues to give God's intended message to His people, the Church. This is why it is so important to read the Scriptures WITH the People of God, the Church.
Regards