Why did it take thirty years for the Gospels to be written?

This is a subjective answer as no definitive one can be made. Scholars have a vast range of dates for the Gospels. The New King James Study Bible has a consensus range of dates from 50 AD to 95 AD. What truly matters is what is written in these books and not when they were written.

If the above date range is accurate, then Christ's Resurrection occurred in 31 AD and the Apostles left the Jerusalem area beginning their mission circa 42-43 AD, then the first of the Gospels could have been written within 7-10 years of that date.
All the New Testament gospels were originally written anonymously and only attributed the the apostles whose names they now bear, later in the second century. Internal evidence has been used to date Mark convincingly to approximately 70 CE, which is perhaps a little over thirty years after the traditional year of the crucifixion of Jesus.

Scholars have demonstrated that the Gospels of Matthew and Luke were based largely on copying from Mark, often word for word in the original Greek language. They therefore could not have been written until Mark was published and had begun to circulate. Matthew is considered by scholars to have been written during the 80s of the first century, although Raymond E Brown (An Introduction to the New Testament) cautions that a tolerance of ten years either side of this decade should be allowed. Luke was probably written late in the 90s of the first century, or quite early in the second century. Since John was inspired by Luke, it must be the last of the New Testament gospels, written early in the second century.

The date Mark's Gospel was written, approximately 70 CE, coincides with the end of the First Roman-Jewish War, so it is plausible that the War was the reason for the first evangelist writing his gospel. It could be that the traumatic events leading up to the time of writing really did seem as if the world was about to end, just as Mark says in chapter 13. It could be that the Christians, who were still regarded very much as Jews, wanted to show the Romans that Christians bore them no ill-will and would be no threat to the Roman peace. Or it could be that the disarray in which Judaism now found itself created a potential for converting some of the Jews.