The miracle of the Virgin Birth is a lynch-pin of orthodox Christian faith. If you deny that Christ was born of a virgin, you deny that He was conceived by the Holy Spirit, and thereby deny that He was born the Son of God. You reject the miracle of the Incarnation, you reject the purpose of His life on earth, and you reject the meaning of His death on the cross. The Church stands united on this issue, overcoming all schismatic division: the Virgin Birth is one of the essential truths of the faith.
But many Christians are content to leave it at that. Most Protestants in my experience defend the virgin birth, but don't find anything particularly objectionable in the idea that Mary went on to marry Joseph and have other children (citing the brothers of Jesus, to which Scripture sometimes refers). As a Protestant I too wondered why Catholics insisted on her perpetual virginity.
There are some indicators of this doctrine even in the Scriptural account. At the Annunciation, the archangel Gabriel informs Mary: "Behold, you will conceive in your womb and bear a son, and you shall name Him Jesus." Mary's response is perplexing: the literal translation reads "How will this be, since I know no man?" As St. Gregory of Nyssa (younger brother to Basil the Great) pointed out, we should wonder why Mary didn't make the connection to her impending marriage to Joseph. The archangel only told her that she would conceive, in the future, and her response is to wonder how that would be possible -- even in the future. The Roman Catholic and Orthodox understanding is that Mary had pledged herself as a lifelong virgin, and that her betrothal to Joseph was in fact his pledge of guardianship.
It should be noted that this doctrine does not conflict with other passages in Scripture. There are several oft-quoted proof-texts that cite the "brothers of Jesus" (Matthew 28:10, Mark 6:3, Luke 8:19, and John 20:17, among others) as clearly contradicting this doctrine. But this reading fails to recognize that the Hebrew word translated as "brother" (adelphoi) was in fact a catch-all word for male kinsmen, which would include half-brothers, stepbrothers, first cousins, and quite possibly third cousins once removed.
As a brief side note, I sometimes marvel at those who think any verse could be an authoritative rebuttal to the dogma of perpetual virginity (or any other dogma, for that matter). Given the brilliance of the Fathers and the exegetical rigor of the Doctors who gave us Catholic tradition, don't we imagine that the early church would have noticed any obvious contradictions and not made such claims in the first place? Isn't it rather absurd to imagine that it took nearly two millennia for Christians to notice such verses?
The dogma of perpetual virginity arose out of the tradition of the early Church. The earliest reference to the dogma appears, somewhat obliquely, in a letter from Ignatius of Antioch (circa 108 AD). The earliest defense to the dogma appears in the second century, in a pseudo-epigraphical text now referred to as "The Protoevangelium of James." While the work is not canonical, it is cited approvingly by Origen in the third century as confirmation that the perpetual virginity of Mary was an accepted doctrine in the early church. Before this point, the only recorded dissent was voiced in the second century by Tertullian, who denied that Mary's virginity was preserved in partu (during birth), in order to affirm the physical reality of the Incarnation against the Docetist heresy. However, even the fact that Tertullian had to actively deny Mary's perpetual virginity would seem to corroborate Origen's conclusion that it was a widely held belief. By the fourth century, the dogma was attested by most of the Church Fathers, including Athanasius, Ambrose, and Jerome, and it would not be questioned until well after the Protestant Reformation.
None of this, however, addresses the question of how the early church arrived at this dogma in the first place. The answer to that relies primarily on a particular mode of Scriptural exegesis called "typological." This hermeneutic is best understood by St. Augustine's well-known dictum: "The New Testament lies hidden in the Old and the Old Testament is unveiled in the New."
If there is a single defining characteristic of the Jewish faith during the time of Christ, it was the Temple. The original Temple was built by Solomon, the archetypal son of David, as the center of religious observance for the nation of Israel. But the Temple was not considered holy in and of itself. Its holiness was rather derived from the object it was built to house: the Ark of the Covenant. The Ark was placed in the Holy of Holies, the inner sanctum of the Temple that only the High Priest could visit only once a year to offer a single sacrifice of blood and incense.
What then was this Ark of the Covenant? According to Hebrews 9:4, it was a vessel "covered on all sides with gold, in which there was a golden jar holding the manna, and Aaron's rod which budded, and the tables of the covenant." The Ark was constructed by Moses to hold the bread which gave life to Israel in the desert (Exodus 16:32), the rod of the the Priest who stood before God on behalf of the people (Numbers 17:10), and the stone tables on which the Word of God was written (Deuteronomy 10:1-5). Scripture and tradition confirm that the early church treated these three items as typologies of Jesus Christ. He is "the bread of life" (John 6:35), "the High Priest of our confession (Hebrews 3:1), and "the Word made flesh" (John 1:14). The Ark of the Covenant bore within itself the typologies of Jesus Christ.
If true, then by the same typological reading, the Ark of the Covenant would itself be a typology for the one who bore Jesus Christ come in flesh. The Ark of the Covenant prefigures the Virgin Mary.
Do we begin to understand why the early church insisted on Mary's perpetual virginity? To borrow an analogy from Scott Hahn, a Presbyterian-turned-Catholic apologist, Catholics believe in the perpetual virginity of Mary for the same reason that most people wouldn't bring their fine china on a picnic. It's a matter of propriety.
For a period of nine months, the womb of Mary was quite literally the Ark of the New Covenant, the vessel which bore God in bodily form. Mary herself may be considered the Holy of Holies, as she was overshadowed by the power of the Most High (Luke 1:35). Yet, by the typology of the Temple, only one person was permitted to enter the Holy of Holies, and that was permitted only for a single purpose. That purpose was fulfilled when the Holy Spirit came upon her to conceive the Son of God.
It would have been inappropriate, then, for Joseph to perform the same duties as a husband, for this would have diminished the living Temple that was his virgin wife. The logic of this teaching does not imply, as some have said, that marriage is not a sacrament or that sex is not a blessing. It merely recognizes the specifically sacred function of this particular woman and this particular womb.