While Matthew has much in common with Mark, there are two important structural differences. First, Matthew adds new material to the beginning and the end of Mark’s account.
. . . Second, Matthew adds into Mark’s mainly action-packed story five blocks of teaching by Jesus.
Although Matthew takes over almost all of Mark’s material, he is not constrained by Mark’s order. Matthew adopts a more topical arrangement and sometimes significantly changes the order in which Mark describes things.
Related: See my interview with Desi Alexander on biblical theology.