... is itself of dubious veracity; it is merely attributed to Pope Gelasius I (Link)
But let's say there are grounds to condemn the theology on the Protoevangelium. Still, it does nothing to take away from the fact that a 2c. book recorded Mary's intention to not consummate her marriage to Joseph carnally, even before the Annunciation. If it were such an outrageous idea as it is to 21c. Americans, it would not be in the book that survived to this day. We take much historical knowledge from books that are not theologically sound.
But let's say there are grounds to condemn the theology on the Protoevangelium. Still, it does nothing to take away from the fact that a 2c. book recorded Mary's intention to not consummate her marriage to Joseph carnally, even before the Annunciation.
It appears you are assuming the "fact" of her intention to remain a virgin without evidence.
This story was written over 150 years after the facts, most likely to insert perpetual virginity belief where the bible seems to oppose it. It is not surprising you find validation in this fanciful apochryphal myth rejected by Jerome and called "apochryphal ravings" by Aquinas.
We don't know who wrote it (written around 150 AD) but it certainly was'nt James the Lord's brother, so the named author is a liar, it also says Mary lived in the Holy of Holies from age 3 to 12 being fed by an angel among other fantastic and false claims.
While an immediate answer is that our knowledge of Joseph comes from the Bible, it is not difficult to see that the Scriptures make no mention or implication of Joseph's advanced age, or other similar details. Such particulars are imaginatively supplied by certain apocryphal writings. Though non-canonical and never considered historical by the Church, such writings have had a great influence on popular devotion.Originally written around the second half of the second century, the aim of this book is to glorify Mary, which means her virginity must be reconciled with the Gospel phrase regarding Jesus' "brothers."
What weight should be given to these texts? From apostolic times, Irenaeus considers that "apocryphal" means "forged" and Tertullian considers it synonymous with "false." Mary and Joseph are made into leading characters, rather than supporting participants in the great mission of Christ. The purpose of these works is apologetic, doctrinal, or simply to satisfy one's curiosity. Though they have a certain literary worth, their stories are much too fantastic to be given historical value in their own right. A decrepit widowed Joseph does not seem capable of performing the role of husband, father and protector that is clearly ascribed to him in the Gospels. Jerome and a number of the fathers flatly rejected the central assertions about St. Joseph found in The Protoevangelium of James and in the other apocrypha which build on it.
http://www.osjoseph.org/stjoseph/apocrypha/