If Jesus is the son of God then why bother listing his genealogy? Mathew gives the following geneolgoy:


  Abraham Isaac Jacob Judah &amp; Tamar Perez Hezron Ram Amminadab Nahshon
  Salmon &amp; Rahab Boaz &amp; Ruth Obed Jesse David &amp; Bathsheba Solomon &amp;
  Naamah Rehoboam Abijam Asa Jehosaphat Jehoram Uzziah Jotham Ahaz
  Hezekiah Manasseh Amon Josiah Jeconiah Shealtiel Zerubbabel Abiud
  Eliakim Azor Zadok Achim Eliud Eleazar Matthan Jacob Joseph &amp; Mary *
  Jesus


Luke provides this one:


  God Adam Seth Enos Cainan Maleleel Jared Enoch Mathusala Lamech Noe
  Shem Arphaxad Cainan Sala Heber Phalec Ragau Saruch Nachor Thara
  Abraham Isaac Jacob Juda Phares Esrom Aram Aminadab Naasson Salmon
  Booz Obed Jesse David Nathan Mattatha Menan Melea Eliakim Jonam Joseph
  Judah Simeon Levi Matthat Jorim Eliezer Jose Er Elmodam Cosam Addi
  Melchi Neri Salathiel Zorobabel Rhesa Joanna Juda Joseph Semei
  Mattathias Maath Nagge Esli Naum Amos Mattathias Joseph Janna Melchi
  Levi Matthat Heli Joseph Jesus


Source: http://en.wikipedia.org/wiki/Genealogy_of_Jesus

Shouldn't it just be God &amp; Mary -> Jesus?

Also, don't all genealogies go through the masculine side? Since Josef the Carpenter is not the father of Jesus what exactly are these genealogies trying to prove?
As Westerners, we live in what is known as a "guilt culture". Accordingly, we lack an understanding of the importance of familial lineage. Most of the Middle-east operates on what is know as an "Honor-Shame culture"

In a lecture before the Biblical Archaeology Society, Anthropologist Dr. Richard Rohrbaugh explains the significance of Geneologies. He explains that this establishes the reputation and credentials for Jesus.  I have transcribed some relevant excepts of this lecture below: 


  Now, The Baltic Culture Continent that you and I live in, anthropologist call a “Guilt Culture”. ...the Mediterranean Culture Continent both today and in antiquity is what anthropologists call an “Honor-Shame Culture”.
  
  ...
  
  Honor is relatively simple actually to understand. Honor is your standing in the pecking order of the village, together with the public recognition of that.  There is no such thing as claiming honor that the village does not recognize. To claim honor that the village does not recognize is to be uppity; brash; a braggart; a fool. Honor is public reputation in the village and everybody in the village knows exactly where you stand in the pecking order. The reason for that is there are two primary ways in which you can get your honor rating or ranking in a village. ...
  
  The overwhelming way in which you get your honor rating is from your birth. It's what anthropologist call “ascribed honor.” It's the honor that you get the day you pop out of the womb. It's the honor that you and every member of your extended family has - male and female - everybody in your family has, has always had, and always will have. That kind of Ascribed Honor means that if you are born in a very high family, you have a high honor ranking. If you are born a low-life, you have a low honor ranking and you're probably going to have a till the day you die. So the overwhelming way in which you get your honor is from the family of your birth. Do you now understand why genealogies are so important in the Bible? Genealogies indicate in writing what a village knows orally. Namely, the family you were born in and hence the on a ranking you have.
  
  ...
  
  I spent some time living in the little Palestinian village of Beit Jala in the West Bank doing research. My primary area of interest is peasant studies and in living in Beit Jala, I discovered that when I would be introduced to peasants they would often immediately tell me their genealogy. For most peasants it's only three generations long: me, my father, and my grandfather. Maybe my son - Maybe four. Sometimes in an oral setting like that they will go back and add the eponymous ancestors of the community - Abraham Isaac and Jacob.
  
  ...
  
  Genealogies are, if you will, a kind of a map for the whole community - describing exactly where in the scheme of things you fit. Among non-literate people (which in antiquity was about ninety-six percent of the population); among non-literate people genealogies would be very short. Only upper class wealthy people have written genealogies. And you understand that the longer the genealogy, the better? Because it means you're from old money not new money. You understand?
  
  ...What I find interesting is the genealogy in Luke - It goes all the way back to “son of seth, son of Adam, son of God”. That is, it traces it to the beginning. That's the longest genealogy possible. Do you understand that in honor claim is being made? In fact we know from Roman texts that people in the Roman world who did become newly rich and wanted to move up the social ladder hired genealogists to create fictive genealogies for themselves and there were a few stars in the pantheon of Roman ancestors they all wanted to be associated with. For a fee, you could get that association. Now you have the map that tells everybody where you fit in the pecking order of things and that had an enormous impact on your life.
  
  I’m going to show you some slides in a minute of some ancient text that describe the fact that your honor ranking determine who ate with whom, who could marry whom, who spoke to whom, who listened to whom.  It determined who would speak first in a conversation. It determined who would marry whom and who would do business with whom. In fact it determined most of the social patterns of your life. It's therefore critically important that everybody in the village know exactly where you stand - because it provides the road map for how you and I are going to interact with each other.
  
  ...
  
  Jesus comes from a no-account little village. He's a village – a τέκτων (tektón) he is called in the Greek. We translate it carpenter – it could be a worker in metal, stone, or wood. I don't have time today but to show you just how low on the social scale that really is - It's very near the bottom. People like that don't get up and talk in public. So when Jesus does, It confuses everybody. In the Middle-East they expect somebody born of a great family to be great. You're born of a low family you're going to be no-account. What does not compute in their social compass is somebody born to a low-life family who turns out to be great. How do you explain that?
  
  Well of course what Matthew and Luke do to explain it is they give us these very elaborate birth stories in which they try to tell us that God was somehow unusually involved in this birth. Otherwise there could be no expectation that anybody would listen to Jesus. What do his opponents do in the twentieth chapter of Luke? They say, “Who gives you the authority to speak like this?” Note that they didn't say, “Did you have this authority from your birth?” They know that's not true. “Who gave you this authority?” Their assumption is somebody had to have acquired the honor from somebody who recognized it because all honor has to be publicly recognized.


So, in short, the genealogies are given because 1) they have traditional and cultural significance and indicate great standing and importance and 2) Just as you note, (at least one genealogy) claims Jesus to be the Son of God - it just does it via a more circuitous route in order to lend Jesus the honor ranking implied by all those ancestors who came before Jesus. (the other genealogy links Jesus to the eponymous ancestors of the community which is nearly as significant).

Despite both genealogies of Jesus listing Joseph as the father of Jesus, one of the given genealogies does, in fact, appear to go through Mary's side of the family. In the genealogy of Matthew, Joseph is listed as the son of Jacob while in another he is listed as the son of Heli. The first several generations of the genealogies are radically divergent, so either one is fictitious or one is the genealogy of Joseph while the other is the genealogy of Mary. Presumably, at the time of writing the gospels, children, grandchildren or great-grandchildren of Mary and Joseph were alive at the time of the writing of the gospels and would have known the genealogy of Christ. These records might also be obtained through the Roman census data at various times, so the most probable option is that one of the genealogies belong to Mary.

The translators of the NET point out that the parenthetical remark in the text is meant to indicate that the genealogy might not be Joseph's:


  The parenthetical remark as was supposed makes it clear that Joseph
  was not the biological father of Jesus. But a question still remains
  whose genealogy this is. Mary is nowhere mentioned....


Another reason that this makes complete sense is that Jewish heritage does not come through the masculine side, but instead is a function of the maternal heritage. Wikipedia has an excellent article on Matrilineality in Judaism and in it it, they explain,


  The Mishnah (Kiddushin 3:12) states that, to be a Jew, one must be either the child of a Jewish mother or a convert to Judaism


Later, it states


  In the Hellenistic period of the 4th Century BCE – 1st Century CE some evidence may be interpreted to indicate that the offspring of intermarriages between Jewish men and non-Jewish women were considered Jewish
  
  ...
  
  Josephus (37 CE – c. 100 CE), in Antiquities of the Jews, refers to marriages between Jewish men and Gentile women without much commentary and seems to assume that the offspring is Jewish;


It is thus not unlikely that one of these genealogies comes through Mary, and both Aquinas and Clement as well as numerous others have shared this view. Even if one of the genealogies is fictitious however, a great honor claim is made nonetheless as Rohrbaugh explained.