First of all, you’re only referring to the gospels, which make up about half of the New Testament… which makes up about a 1/7 of the Bible as a whole.
Secondly, scholars generally date the gospels to sometime after 70 A.D. because they seem to refer to an event that happened then—the destruction of the Temple at Jerusalem. They also clearly were not written by “eyewitnesses” as they refer to scenes in, for example, Pontius Pilate’s bedroom.
Mark is generally considered to be the earliest gospel. Matthew and Luke both contain large portions of the text from Mark’s gospel. In addition, Matthew and Luke contain identical text that is not found in Mark’s gospel—this text is referred to as “Q” by scholars, and is simply all the identical (or very similar) lines found in Matthew and Luke but not Mark.
The long and the short of all this is that Mark, Matthew and Luke were all clearly put together from a number of earlier sources (in Matthew and Luke’s case, one of those sources was Mark). You can read these three gospels side by side, or synoptically, and encounter many of the same verses in the same order. So Mark, Matthew, and Luke are called the “synoptic gospels.”
John is different. It presents a very different picture of Jesus than the synoptic gospels. For example, the synoptics all have Jesus spending significant time battling and casting out demons. There are no demons in John’s gospel. John’s gospel is also much more influenced by gnostic ideas than the synoptics. It also doesn’t contain many similar verses and the “plot” is slightly different. So scholars generally think that John comes from a different tradition than the synoptics.
Now, the names “Matthew, Mark, Luke, and John” are all characters in the gospels. But we actually have no idea who the authors of these texts are. The earliest versions of the gospels are unsigned and undated. The idea that the four gospels were written by these four people/characters is a later Christian tradition first put forth in the second century, long after Jesus died and long after the gospels had been circulating. Most scholars doubt that they were actually written by any of these people.
One final point. “History,” as written and practiced in ancient Rome, was very different from the standards of history we have today. For example, the idea of “quoting” people did not exist. Thucydides, possibly the greatest (and most skeptical) historian of the ancient world, made up entire gigantic speeches and attributed them to the leaders he was writing about. Ancient history was also filled with gullible legends. Herodotus routinely reported fantastic events from “eyewitnesses” that were plainly the ancient equivalent of urban legends. Josephus, a Jewish historian contemporary with the gospel-writers, wrote a history of the war between the Jews and the Romans where he reported that a floating army with chariots appeared in the sky, “witnessed by many,” even though it “would seem as a fable.”
The gospels come from this tradition—except that, unlike Josephus, Thucydides, and other “legitimate” ancient histories, they are all unsigned, undated, and redacted by cult followers.