9 Why then, it may be asked, did he not so in the Virgin's case also, and declare the good tidings to her after the conception? Lest she should be in agitation and great trouble. For it were likely that she, not knowing the certainty, might have even devised something amiss touching herself, and have gone on to strangle or to stab herself, not enduring the disgrace. For wondrous indeed was that Virgin, and Luke points out her excellency, saying, that when she heard the salutation, she did not straightway pour herself out, neither did she accept the saying, but “was troubled,” seeking “what manner of salutation this might be.” Now she who was of such perfect delicacy would even have been distracted with dismay at the thought of her shame, not expecting, by whatever she might say, to convince any one who should hear of it, but that what had happened was adultery. Therefore to prevent these things, the angel came before the conception. Besides that, it was meet that womb should be free from trouble which the Maker of all things entered; and the soul rid of all perturbation, which was thought worthy to become the minister of such mysteries. For these reasons He speaks to the Virgin before the conception, but to Joseph at the time of travail.
And this many of the simpler sort, not understanding, have said there is a discordance; because Luke says it was Mary to whom he declared the good tidings, but Matthew, that it was Joseph; not knowing that both took place. And this sort of thing it is necessary to bear in mind throughout the whole history; for in this way we shall solve many seeming discordances.
Source: Homilies on the Gospel of St. Matthew (New Advent)