It is my understanding that as it is with other saints who pledge their virginity to God, Catholics / human beings who die virgins are given a special place in heaven. I don't want to say that they get "special treatment" but I think that this may be the case. Mary is not just any saint; she is the highest saint in Heaven, so if for no other reason than to be an example to other saints, she should and did stay a virgin. Joseph was okay with this because he knew his primary job was to protect Mary and Jesus from harm. This is why Joseph is called the Protector of the Church. He was also a widower who had at least one child, so it's not like he missed out on the chance to beget children. (Neither did Mary for that matter.) Mary did not have a problem with being a perpetual virgin because she was born without original sin. Therefore she had no concupicence, or desire to sin. Not to say her life was a walk in the park, I'm sure it wasn't, but being without original sin I'm sure was a plus. She uses these gifts every day as she prays for us; she does not take them for granted by any means. I would imagine that if a woman is going to be the mother of God, God the Father would want to keep her as pure as he could. Yet another reason for her virginity. Oh yeah - my priest also says that Jesus and Mary are the New Adam and the New Eve. Adam and Eve sinned, so it was up to Jesus and Mary to undo everything in perfect reversal that they did in order to save this world. If you'll notice, Eve came from Adam when God took Adam's rib and went to work making her. Therefore, in order to reverse that, God made it so that Jesus, a man, came from Mary, a woman, His Mother. Adam and Eve both sinned, so God also had to make it so that Jesus and Mary were both sin-less. Thus, Mary's Immaculate Conception and Jesus's dual human/Divine nature.
I’m not much on finding stuff in the Catechism and stuff like that, but I pay attention when I go to Church on Sunday. That’s where I get my information. If someone else wants to back me up, that would be great.