The author of Matthew does indeed go to great lengths to restore the image of the disciples from the negative way that they were presented in the gospel of Mark. In Mark, the disciples rarely understand the things Jesus does i.e. miracles, parables, etc. Some of this confusion is present in Matthew as well yet it is generally coupled with either a further explanation by Jesus and a statement that the disciples now understood or the disciples understanding is not mentioned at all. The author’s reason for this portrayal could be a number of things.
In White’s chapter discussing this issue, he notes the importance of the social environment that the Matthean group can be placed in. There are distinct clues in the gospel that show a growing separation between the early Jewish Christians and the traditional Rabbinic or Pharisaic Judaism like a particular switch of the word “the” in reference to the synagogue to “their.” This switch reflects that separation by essentially disowning the synagogue and noting the presence of different sides, an “us” and a “them,” whereas in Mark, it can be assumed that this gap was not so prominent or important to the author. If in fact the Matthean group was located geographically where some scholars and White believe, they would have been constantly in contact with this issue due to the large population of Jewish people in the area so it would make a lot of sense then for the author of Matthew to strengthen the defenses of his side, as it were, and restore the authority of the disciples as wise and knowledgeable men who could rival the Pharisees. This seems the most probable theory as to the differing accounts of the disciples understanding, the author of Matthew needing them to be worthy of authority but I also had some ideas while reading the passages and White’s chapter.
Something that I cannot help but think of is that if in fact the gospel was written by whoever Matthew/Levi the tax collector was, it would certainly seem to make sense to want to change the perception of the disciples. As someone trying to gain followers, it never helps to seem clueless and if in fact Matthew/Levi was the author, it would make sense for him to try to save fact perhaps or at least just seem a little less confused.
I think also that there is a more moderate explanation for the difference in portrayal of the disciples as well. Rather than purely based upon the social context, it seems possible to me that the author of Matthew may have personally had a more developed understanding of Jesus than the author of Mark. Especially if Mark was written first and studied by the author of Matthew, it makes sense that reading over the story and adding in the Q source that the author of Matthew would come to his own higher Christological conclusions and quite literally put himself in the position of disciple who seems to understand.