From an earlier post of mine:
The interesting thing is that the statement in Matthew directly contradicts Paul's doctrine on the resurrection. 1 Corinthians 15:20-23 states: "But Christ has in fact been raised from the dead, the first-fruits of all who have fallen asleep. Death came through one man and in the same way the resurrection of the dead has come through one man. Just as all men die in Adam, so all men will be brought to life in Christ; but all of them in their proper order: Christ as the first-fruits and then, after the coming of Christ, those who belong to him." Matthew 27:51-52, by stating that "the bodies of many holy men rose from the dead" at the same time the veil in the Temple was rent, suggests that the resurrection of the righteous happened before Jesus was resurrected -- in fact, at the very moment he died. Here the "proper order" is reversed. Paul believes that "all who have fallen asleep", "all [who] die in Adam" (whom he equates with those "dead in Christ," since they have been redeemed by Him) would rise at Christ's return. This is the same view expressed in 1 Thessalonians 4:16, where those "dead in Christ" (presumably all who have been redeemed by Christ) "will be the first to rise" at Christ's second coming. 2 Timothy 2:18 (of the Paulinist school) specifically refutes the notion that "the resurrection has already taken place."
So what's the deal with Matthew's narrative? It is important to note that this story about the holy ones rising from the dead was a Matthean addition to the original Markan account. This story is absent in Mark 15:38, and it doesn't appear in the Lukan version of the account (Luke 23:45). In fact, other early gospels based on the same crucifixion narrative also omit any mention of this resurrection but mention the splitting of the temple veil (cf. Gospel of Peter 5:15-20; Gospel of the Nazoreans, Fr. 21, 36; Acts of Pilate 11:1-3). Now this in itself is quite remarkable since the resurrection of the holy ones would have been an awesome event, even more so than the tear in the temple veil, yet it is nowhere mentioned by Mark, Luke, John, or any other gospel except of Matthew and later versions of Matthew.
Furthermore, it is fairly certain that the account in Matthew has been altered in its wording. The biggest problem are the words "after his resurrection", which -- most bizarrely -- delays the appearance of those resurrected for three days (Matthew 27:53). This totally defeats the whole purpose of having them raised when Jesus dies on the cross as something that led the centurion to confess Jesus as the Son of God (Matthew 27:54). The centurion certainly could not have been awed by their resurrection if the resurrected dead did not leave their tombs! The delay however does bring the canonical account into line (partially) with Pauline theology, which proclaims Jesus as the "first fruits" of the resurrection. For Paul, the "saints" could not arise before Jesus himself has risen. Yet the gloss fails to bring Matthew fully into line with Pauline theology since the bodily resurrection of the righteous dead still takes place before Jesus.
There is actual textual evidence that the text in Matthew has been altered. One of its earliest witnesses was the Diatesseron, a gospel harmony produced by Tatian at the end of the 2nd century. This harmony was in turn based on the one produced by Justin Martyr several decades earlier. The Pepysian Harmony and the Ephrem Commentary both attest the Diatessaron reading as follows:
And with that, the veil that hung in the temple before the high altar burst in two pieces, the earth quaked, and the stones burst, and the dead men arose out of their graves. And entering the holy city, they appeared to many. And the centurion and those with him, who stood facing Jesus, saw the earthquake and what took place, and said with awe, "Truly this was the Son of God!"
Here the gloss does not appear and the appearance of the risen dead in Jerusalem occurs at the same time as Jesus' death and was witnessed by the centurion. This reading makes better sense with the context. It also lacks the greater detail of the canonical account in this passage -- all of which is theologically loaded: "bodies" (more specific and agreeing with Paul in 1 Corinthians 15:35-44), "of saints" (certainly superior to the mere "dead" of the Diatessaron, and therefore more developed, and also Pauline), "who had fallen asleep" (again a more elegant description, and again used by Paul in 1 Corinthians 15:20 and 1 Thessalonians 4:14). All this suggests that the Diatessaron's reading is earlier and preserves a more primitive version of the text than does the canonical text, which has been revised to bring it into conformity with Pauline theology.
So what we have here is a geniunely independent account in Matthew, and one that presents a different theory of the resurrection than that of Paul.