Joseph married Mary and, presumably, would have adopted Jesus as his son. To the Jews that should be enough to establish his legal right to the throne. Gentiles wouldn't buy that argument, so another way is also established.
Why do we "need" two accounts? For that matter, why do we need four gospels? Each one records different events, has a different audience, and more generally, supports a different aspect of Jesus.
Matthew is written to the Jews. It makes a pile of "Old Testament" references without really explaining them. The Jews would have understood. Matthew establishes Jesus as the Messiah, which is also a Jewish thing. (The Gentiles may not understand, and probably wouldn't care.) Matthew, as a government official, may have been skilled in shorthand, explaining why his gospel contains the most direct quotations of Jesus. To re-iterate the genealogy point above, Matthew includes a genealogy that makes the most sense to a Jew, to establish the Messiahship of Jesus.
Mark contains at least 7 instances where a translation is given for an Aramaic term. His readership was probably not Jews. (Aramaic being the day-to-day language of the Jews at that time.) Also, he includes a number of Latinisms... Latin transliterations, and idioms. His audience is probably the Romans. Mark is short and fast paced. It's purpose is probably to document the ministry and passion of Jesus. (the crucifixion story, that is.) This gospel begins with John the Baptist baptizing Jesus (a genealogy, of sorts?) and ends abruptly with the resurrection.
Luke is a very carefully researched document written for a Gentile audience. It establishes the humanity of Jesus. The genealogy follows his bloodline and also goes back to Adam rather than stopping at Abraham as in Matthew. Some have suggested that Luke together with Acts was written as a defense document for Paul's trial in Rome. Romans are cast in a more positive light in Luke than in the other gospels.
John is easy because near the end he states the purpose of the book -- "that you may believe that Jesus is the Christ, the Son of God..." John focuses on the deity of Jesus. This is also reflected in the "genealogy" in the first verse: "In the beginning was the Word, and the Word was with God, and the Word was God." (If you have trouble with "the Word" being Jesus skip down to verse 14: "and the Word became flesh and dwelt among us")
So, why four accounts? Each one provides a different viewpoint that can give us a more complete understanding of Jesus. It's basically the same as why a police officer would ask multiple witnesses for their accounts of a traffic accident... each one may have seen something different, and when you put them all together you get a better picture.