There were many different writers, who lived and wrote in different countries. They came from different walks of life and different social positions. One wrote history, another biography; another wrote on theology, another poetry, another prophecy. Some wrote on philosophy, and some stories of adventure, travel and romance.
Most of them had no contact with each other and no means of knowing that when their writings were all put together as one book it would be complete, all parts agreeing in doctrine, teaching and prophecy.