In the Matthew gospel we are told both that Christ is the son of David and then again that Christ was not the son of David, but rather God was literally the father of Christ. Yet the
early church insisted that Christ was the son of David and thus the Matthew Jewish community had to move out of the mainstream of Christian thought to make this assertion, taking
one more stand against the apostle Paul, something which seemed typical for them to do (because in this case they represented a reactionary backlash movement in the early church among conservatives, something easy to demonstrate.)
In order to understand what is going on here, you must remember that certain elements of this Jewish community were
terribly bigoted against Gentiles. And they held to the infallible inerrancy of the Torah, right down to the last dot over the last letter ‘i'. And you might recall how
Moabites and their descendants were banned from the assembly forever and ever and ever. And you might recall how
David was a Moabite ‘half breed'. Now Joseph was a descendant of David, and thus Joseph was tainted with that bad, bad Moabite mixed blood, and was also, by the way, under the eternal Moabite curse of the infallible Torah, at least in their mind, thus there was no way on God's green earth that they were going to allow Joseph to be Christ's father, or to allow Christ to be a Son of David, even if they had to condemn Paul and the rest of the early church and
twist and pervert prophecies from Isaiah and the other prophets, they were not going to allow Joseph, the tainted cursed Moabite half breed and his descendant Joseph to be the father of Christ. The Messiah, carrying that tainted half breed Moabite blood line. God forbid. Now most of what could be used as messianic prophecies are 'pro-David' and mention David, and this explains why this one segment of the community were forced to take passages out of context to make their case. They went searching for some prophecy or anything they could lay their hands on to prove that ‘God was Christ's father' (literally) and certainly not that tainted Joseph, and in the process they found a verse in Isaiah that they could twist and use, and in the process, by coincidence, Mary, the Levite, became Mary, the Levite Virgin, because the passage was mistranslated in the Greek Septuagint. The fact that Mary became a virgin in the process was unimportant to them whose only real concern was finding someway, anyway, to ditch Joseph and his half breed ancestor, David, as Christ's ancestors. You see, they had a terrible character flaw, in that they were just that bigoted, and that is why the church today has a virgin birth story. (Peculiar tale, is it not?)
The fact that some controversy existed over Christ's ‘half breed' status is also found in the gospel of John. You might recall the story in Kings, quoted previously, that suggested that
Samaritans were themselves a kind of bastardized half breed of a Jew. Some of the Jewish people were attacking Joshua and calling him ‘a Samaritan' (translate, in the light of Kings quoted above, and this means they were calling him some bastardized, Gentile dog mixture of a Jew).
These would be those same Jewish people who just didn't have anything to do with Samaritans or other Gentile dogs. So someone came to ‘the rescue' and out the door goes Joseph, and in comes the Holy Ghost to get that job of impregnating Mary done to their satisfaction. So the virgin birth story originated in a bigoted mind, and in his whose eyes, even King David was unsuitable as a father for Joshua Messiah. The virgin birth story was not original to the Matthew gospel but a later interpolation, and this explains why Christ was not a descendant of David and yet at the same time throughout the Matthew gospel he is called ‘the son of David' (a messianic title) both at the same time. This reactionary element would have also have been responsible for inserting the inconsistent statement regarding the infallible inerrancy of the Bible into the Sermon on the Mount, so as to keep the whole Torah and the prophets, including the prophets who condemned the Torah, both at the same time, a fine example of how dissonant things can somehow miraculously coexist in the mind of bigoted person, and no big surprise really. Mark heard nothing about a virgin birth, and has nothing to say about it, Paul doesn't mention it, and as for Luke picking up on that story and spinning it out even further, well, Luke did a lot of things with the gospel, and that was just one of them (and a story for another page).