No doubt, the books of the Bible were written with the intention of you believing in them, meaning you believe in the doctrines that are extracted from the texts. However, it's not really reasonable for you to believe doctrines that come from texts that are historically trustworthy. Therefore, it's to the authors' benefit to write texts that are historically correct.
As a side note, the Book of Mormon falls in this category. Archaeologists have repeatedly failed to substantiate the historical claims in the Book of Mormon. No Book of Mormon person, name, city, nation, place, artifact, scriptures or quotations have ever been found or located.
Further, the authors had nothing to gain and much to lose from writing the gospels. Indeed, they lived out their beliefs and were usually martyred because of them.
See also: Are the gospels reliable?