I highly suggest you read the entire exhortation. From Redemptoris Custos
7. As can be deduced from the gospel texts, Joseph's marriage to Mary is the juridical basis of his fatherhood. It was to assure fatherly protection for Jesus that God chose Joseph to be Mary's spouse. It follows that Joseph's fatherhood - a relationship that places him as close as possible to Christ, to whom every election and predestination is ordered (cf. Rom 8:28-29) - comes to pass through marriage to Mary, that is, through the family.
While clearly affirming that Jesus was conceived by the power of the Holy Spirit, and that virginity remained intact in the marriage (cf. Mt 1:18-25; Lk 1:26-38), the evangelists refer to Joseph as Mary's husband and to Mary as his wife (cf. Mt 1:16, 18-20, 24; Lk 1:27; 2:5).
And while it is important for the Church to profess the virginal conception of Jesus, it is no less important to uphold Mary's marriage to Joseph, because juridically Joseph's fatherhood depends on it. Thus one understands why the generations are listed according to the genealogy of Joseph: "Why," St. Augustine asks, "should they not be according to Joseph? Was he not Mary's husband?... Scripture states, through the authority of an angel, that he was her husband. Do not fear, says the angel, to take Mary your wife, for that which is conceived in her is of the Holy Spirit. Joseph was told to name the child, although not born from his seed. She will bear a son, the angel says, and you will call him Jesus. Scripture recognizes that Jesus is not born of Joseph's seed, since in his concern about the origin of Mary's pregnancy, Joseph is told that it is of the Holy Spirit. Nonetheless, he is not deprived of his fatherly authority from the moment that he is told to name the child. Finally, even the Virgin Mary, well aware that she has not conceived Christ as a result of conjugal relations with Joseph, still calls him Christ's father."(12)
The Son of Mary is also Joseph's Son by virtue of the marriage bond that unites them: "By reason of their faithful marriage both of them deserve to be called Christ's parents, not only his mother, but also his father, who was a parent in the same way that he was the mother's spouse: in mind, not in the flesh."(13) In this marriage none of the requisites of marriage were lacking: "In Christ's parents all the goods of marriage were realized-offspring, fidelity, the sacrament: the offspring being the Lord Jesus himself; fidelity, since there was no adultery: the sacrament, since there was no divorce."(14)
Analyzing the nature of marriage, both St. Augustine and St. Thomas always identify it with an "indivisible union of souls," a "union of hearts," with "consent."(15) These elements are found in an exemplary manner in the marriage of Mary and Joseph. At the culmination of the history of salvation, when God reveals his love for humanity through the gift of the Word, it is precisely the marriage of Mary and Joseph that brings to realization in full "freedom" the "spousal gift of self" in receiving and expressing such a love.(16) "In this great undertaking which is the renewal of all things in Christ, marriage-it too purified and renewed-becomes a new reality, a sacrament of the New Covenant. We see that at the beginning of the New Testament, as at the beginning of the Old, there is a married couple. But whereas Adam and Eve were the source of evil which was unleashed on the world, Joseph and Mary arc the summit from which holiness spreads all over the earth. The Savior began the work of salvation by this virginal and holy union, wherein is manifested his all-powerful will to purify and sanctify the family - that sanctuary of love and cradle of life."(17)
How much the family of today can learn from this! "The essence and role of the family are in the final analysis specified by love. Hence the family has the mission to guard, reveal and communicate love, and this is a living reflection of and a real sharing in God's love for humanity and the love of Christ the Lord for the Church his bride."(18) This being the case, it is in the Holy Family, the original "Church in miniature (Ecclesia domestica),"(19) that every Christian family must be reflected. "Through God's mysterious design, it was in that family that the Son of God spent long years of a hidden life. It is therefore the prototype and example for all Christian families."(20) ...
18. Above all, the "just" man of Nazareth possesses the clear characteristics of a husband. Luke refers to Mary as "a virgin betrothed to a man whose name was Joseph" (Lk 1:27). Even before the "mystery hidden for ages" (Eph 3:9) began to be fulfilled, the Gospels set before us the image of husband and wife. According to Jewish custom, marriage took place in two stages: first, the legal, or true marriage was celebrated, and then, only after a certain period of time, the husband brought the wife into his own house. Thus, before he lived with Mary, Joseph was already her "husband." Mary, however, preserved her deep desire to give herself exclusively to God. One may well ask how this desire of Mary's could be reconciled with a "wedding." The answer can only come from the saving events as they unfold, from the special action of God himself. From the moment of the Annunciation, Mary knew that she was to fulfill her virginal desire to give herself exclusively and fully to God precisely by becoming the Mother of God's Son. Becoming a Mother by the power of the Holy Spirit was the form taken by her gift of self: a form which God himself expected of the Virgin Mary, who was "betrothed" to Joseph. Mary uttered her fiat. The fact that Mary was "betrothed" to Joseph was part of the very plan of God. This is pointed out by Luke and especially by Matthew. The words spoken to Joseph are very significant: "Do not fear to take Mary your wife, for that which has been conceived in her is of the Holy Spirit" (Mt 1:20). These words explain the mystery of Joseph's wife: In her motherhood Mary is a virgin. In her, "the Son of the Most High" assumed a human body and became "the Son of Man."
Addressing Joseph through the words of the angel, God speaks to him as the husband of the Virgin of Nazareth. What took place in her through the power of the Holy Spirit also confirmed in a special way the marriage bond which already existed between Joseph and Mary. God's messenger was clear in what he said to Joseph: "Do not fear to take Mary your wife into your home." Hence, what had taken place earlier, namely, Joseph's marriage to Mary, happened in accord with God's will and was meant to endure. In her divine motherhood Mary had to continue to live as "a virgin, the wife of her husband" (cf. Lk 1:27).
19. In the words of the "annunciation" by night, Joseph not only heard the divine truth concerning his wife's indescribable vocation; he also heard once again the truth about his own vocation. This "just" man, who, in the spirit of the noblest traditions of the Chosen People, loved the Virgin of Nazareth and was bound to her by a husband's love, was once again called by God to this love.
"Joseph did as the angel of the Lord commanded him; he took his wife" into his home (Mt 1:24); what was conceived in Mary was "of the Holy Spirit." From expressions such as these are we not to suppose that his love as a man was also given new birth by the Holy Spirit? Are we not to think that the love of God which has been poured forth into the human heart through the Holy Spirit (cf. Rm 5:5) molds every human love to perfection? This love of God also molds-in a completely unique way-the love of husband and wife, deepening within it everything of human worth and beauty, everything that bespeaks an exclusive gift of self, a covenant between persons, and an authentic communion according to the model of the Blessed Trinity.
"Joseph. . .took his wife; but he knew her not, until she had borne a son" (Mt 1:24-25). These words indicate another kind of closeness in marriage. The deep spiritual closeness arising from marital union and the interpersonal contact between man and woman have their definitive origin in the Spirit, the Giver of Life (cf. Jn 6:63). Joseph, in obedience to the Spirit, found in the Spirit the source of love, the conjugal love which he experienced as a man. And this love proved to be greater than this "just man" could ever have expected within the limits of his human heart.
20. In the Liturgy, Mary is celebrated as "united to Joseph, the just man, by a bond of marital and virginal love."(31) There are really two kinds of love here, both of which together represent the mystery of the Church - virgin and spouse - as symbolized in the marriage of Mary and Joseph. "Virginity or celibacy for the sake of the Kingdom of God not only does not contradict the dignity of marriage but presupposes and confirms it. Marriage and virginity are two ways of expressing and living the one mystery of the Covenant of God with his people."(32) the Covenant which is a communion of love between God and human beings.
Through his complete self-sacrifice, Joseph expressed his generous love for the Mother of God, and gave her a husband's "gift of self." Even though he decided to draw back so as not to interfere in the plan of God which was coming to pass in Mary, Joseph obeyed the explicit command of the angel and look Mary into his home, while respecting the fact that she belonged exclusively to God.
On the other hand, it was from his marriage to Mary that Joseph derived his singular dignity and his rights in regard to Jesus. "It is certain that the dignity of the Mother of God is so exalted that nothing could be more sublime; yet because Mary was united to Joseph by the bond of marriage, there can be no doubt but that Joseph approached as no other person ever could that eminent dignity whereby the Mother of God towers above all creatures. Since marriage is the highest degree of association and friendship involving by its very nature a communion of goods, it follows that God, by giving Joseph to the Virgin, did not give him to her only as a companion for life, a witness of her virginity and protector of her honor: he also gave Joseph to Mary in order that he might share, through the marriage pact, in her own sublime greatness."(33)
21. This bond of charity was the core of the Holy Family's life, first in the poverty of Bethlehem, then in their exile in Egypt, and later in the house of Nazareth. The Church deeply venerates this Family, and proposes it as the model of all families. Inserted directly in the mystery of the Incarnation, the Family of Nazareth has its own special mystery. And in this mystery, as in the Incarnation, one finds a true fatherhood: the human form of the family of the Son of God, a true human family, formed by the divine mystery. In this family, Joseph is the father: his fatherhood is not one that derives from begetting offspring; but neither is it an "apparent" or merely "substitute" fatherhood. Rather, it is one that fully shares in authentic human fatherhood and the mission of a father in the family. This is a consequence of the hypostatic union: humanity taken up into the unity of the Divine Person of the Word-Son, Jesus Christ. Together with human nature, all that is human, and especially the family - as the first dimension of man's existence in the world - is also taken up in Christ. Within this context, Joseph's human fatherhood was also "taken up" in the mystery of Christ's Incarnation.
On the basis of this principle, the words which Mary spoke to the twelve-year-old Jesus in the Temple take on their full significance: "Your father and I...have been looking for you." This is no conventional phrase: Mary's words to Jesus show the complete reality of the Incarnation present in the mystery of the Family of Nazareth. From the beginning, Joseph accepted with the "obedience of faith" his human fatherhood over Jesus. And thus, following the light of the Holy Spirit who gives himself to human beings through faith, he certainly came to discover ever more fully the indescribable gift that was his human fatherhood.