First you have to realize that god and the messiah are two different things. Jews didn't worship King David nor any of his descendants as such would be strictly forbidden under idolatry laws. What Jesus claims is he's the messiah and he was really just one out of many folks of the time with a messianic claim.
The problem is there's all sorts of problems with Jesus' messianic claim. A few of which are...
1) Matthew lists lineage through Jechonias, which had already been invalidated by Jeremiah. So right away you can throw out the lineage in Matthew, because it was specifically invalidated already.
2) God makes it quite clear in numerous passages, the messianic line will come through Solomon. So right away you can also throw out the lineage in Luke because it also was specifically invalidated.
3) The two lineages are contradictory. After David, Luke takes the path of Nathan while Matthew takes the path of Solomon.
But wait! Christians also claim the whole process was short circuited, because the Holy Poltergeist impregnated Mary, which wouldn't make him the messiah, and why do they go to such great lengths in Luke and Matthew trying to establish a messianic lineage?
Then again, with "metaphor" all things are possible. I think Jesus even said that.