Why was Mary Magdalene initially forbidden to touch the Lord (John 20: 17) but later allowed to do so (Matt. 28: 1, 9)?
The assumption made by the questioner is that Mary was in the party of Matt. 28: 9.
Each of the four evangelists provide sufficient details of the events of the resurrection to suit their individual aims in writing. Thus Mark tells us that the Lord appeared to Mary of Magdala first (Mark 16: 9) but it is John who provides the details (John 20: 14–18). While John records Peter and John going to the empty tomb (John 20: 2–10), Luke mentions only Peter (Luke 24: 12), though he doesn’t exclude John (see Luke 24: 24). The journey of the two to Emmaus is detailed by Luke (Luke 24: 13–35), mentioned by Mark (Mark 16: 12, 13) but omitted by the other two writers. Again, apart from Matthew we would know nothing of the earthquake and the subsequent action of the guards (Matt. 28: 2–4; 11–15). Thus no evangelist gives a complete narrative.
Careful study reveals that Mark nearly always gives the historical order of events and John often does so too. Matthew frequently links events together which are separated by time and Luke often ignores time completely in order to group events together in a moral order. These facts must not be ignored in looking at the events associated with the resurrection. Jewish time must also not be overlooked: the Sabbath was from 6pm on Friday until 6pm on Saturday.
The first person that the Lord appeared to was Mary Magdalene (Mark 16: 9). John 20 reveals that this manifestation took place on the first day of the week (v1) and that she was alone (vs 11–18). Now the AV of Matt. 28: 1 gives the impression that it is speaking of a visit to the tomb by the two Marys at daybreak on the resurrection morning and that they were subsequently present when the angel descended. However, the verse is better translated “Now late on sabbath, as it was the dusk of the next day after sabbath …”. Thus their visit was not on the resurrection morning (Sunday morning) but on the Sabbath just before it ended at 6pm––that is the dusk of our Saturday evening. As verses 2–10 of Matt. 28 clearly refer to the resurrection day (our Sunday), there must be an interval of some hours between verses 1 and 2. A break in time is not unknown in Matthew, a well–known example being the interval between Matt. 1: 25 and 2: 2. There it might appear that the magi were present at the Lord’s birth, but Herod’s ordering of the slaughter of boys up to two years old (v16) shows that it was many months before the Magi arrived at Jerusalem.
Other women came to the tomb besides the two Marys (see Luke 24: 10)––indeed there was probably more than one company of women, with each arriving at different times. Now while Mary Magdalene may have been initially present with the “women” of Matt. 28: 5 as indicated by her saying to Peter and John “we know not”––not ‘I know not’ (John 20: 2), it is that very message that proves she was not present when the angel spoke to the women. For while the message given to the women by the angel was “he is risen” (Matt. 28: 6), Mary can only tell Peter “They have taken away the Lord out of the tomb, and we know not where they have laid him” (John 20: 2). Thus when the Lord met the women carrying the angel’s message, Mary could not have been among them. As He appeared to her first (Mark 16: 9) and alone, she had already met the Lord when He appeared to the returning women.
The women of Matt.28: 9 represent those in Israel who will have the bodily presence of Messiah in their midst in a coming day. Thus they “took him by the feet” (v9) making physical contact. If we only had Matthew we would assume that the Lord was still here for he omits the ascension ending his gospel with the Lord saying “And behold, I am with you all the days, until the completion of the age” (Matt. 28: 20).
While Matthew’s gospel is directed particularly to Israel, John in his record anticipates Christianity (see, for example, John 4: 23) and consequently gives the details of the future service of the Holy Spirit (John 14–16)––which Matthew entirely omits. I believe that Mary Magdalene is representative of Christians, as the Lord, in forbidding her to touch Him, speaks of His ascension. His language implies that when He was ascended to His Father, Mary was still to be ‘in touch’ with Him, but not in the way to which she was accustomed. It was to be by the Spirit. The incident illustrates Paul’s word “So that we henceforth know no one according to flesh; but if even we have known Christ according to flesh, yet now we know [him thus] no longer” (2 Cor. 5: 16).