I've read some articles that show Matthew may have been written as a satire.
The author of Matthew wrote in a magical birth, but then gives a genealogy of an earthly father's line. He made his genealogy come out to 3 sets of 14, for whatever reason. IMO, this author wasn't trying to be accurate.
The author of Luke may have provided a truer genealogy, but then he didn't have the magical birth to contend with.
Even though the authors didn't, if later Christians wanted to attribute one genealogy to Mary it should have been Matthew's and not Luke's.
"The average man does not know what to do with this life, yet wants another one which lasts forever." --Anatole France