What is the origin of the Orthodox belief that Sts. Joseph and Mary were betrothed but not married? The Orthodox refer to St Joseph as Joseph the Betrothed. They assert that he and the Virgin Mary were betrothed, but never married. This differs from the Catholic and Protestant belief that they were married. What is the origin and history of this belief?

In teachings about Joseph where the Orthodox and Catholic differ, the Orthodox seem to align with the Protoevangelium of James. However, I don't see a perpetual betrothal mentioned there. There are places where Joseph denies marrying Mary 'in stealth', but this occurs during her pregnancy with Jesus. I don't think those can necessarily be used to show that they weren't married later.

Related/Inspired by How old was St. Joseph when he married the Blessed Virgin Mary?.
To understand the difference in position, we need to understand Jewish marriage customs at the time of Mary and Joseph, and the ambiguity it already carries by considering betrothal as legally married but not yet as 'fully' married, i.e. consummated, the same ambiguity we see between the Orthodox and Catholic positions. 

A marriage is started with betrothal, in which man and woman are legally 100% married, but without the sexual act. In this phase the woman remains at her parents’ house, as the man prepares the home they will be staying in. This phase can last up to 7 years. Then the marriage is consummated, the sexual act performed. After this, the groom takes the bride into his home, and the wedding is completed. 

Biblical Marriage

There were three states of a marriage in the Bible:
Stage 1: signing the "ketubbah" contract (Creating the marriage bond)


The bride would choose her husband and her father would sign a legal contract with him called a "ketubbah".
Once this is signed the couple is 100% married but do not have sex yet.
Young children were often married, (arranged marriage) but did not consummate it until of age.


Stage 2: The "chuppah": sexual consummation.


Up to 7 years later, the groom is able to raise the money as set out
in the ketubbah contract and notifies the father of the bride, who
then sets a date to consummate the marriage at the bride's home.
The bride waits with her maidens, for the arrival of the groom and
his companions.
The couple enters the chuppah room and consummates the marriage while
the companions of the bride and groom wait and celebrate outside or
in the next room.
The groom hands the bloodied "proof of virginity cloth" to the
witnesses chosen by the bride's parents, who then give it to the
bride for safekeeping.


Stage 3: The wedding feast


After consummation, the entire wedding party walks to the house of
the groom in a procession for a wedding feast. (Could be skipped, see
Isaac and Rebekkah - the main point was bringing the bride from the
fathers house to the grooms house, upon which time all privileges of marriage would be enjoyed as well).
At the conclusion of the wedding feast, the couple has completed the
ancient ritual of marriage.


Orthodox position 

Since Joseph never consummated the marriage, the marriage stopped at the first step.
So it appears that the distinction the Orthodox Churches make between their betrothal and marriage, is to stress that Joseph never consummated the marriage, but only acted as Mary's protector. By holding that they were only betrothed, the doctrine of Mary as Ever-Virgin was secured. They further support this claim by pointing out that Mary and Joseph are mentioned as betrothed, but that the actual marriage is never mentioned. Another source is tradition, stating that Joseph was an elderly widower, taking in a temple maiden with vow of chastity to protect her.  

Apocryphal sources

“Proto-gospel according to James” (2nd century) Instead of the Matthew words “Do not fear to take Mary  your wife”, the proto-gospel of James has the Angel say to Joseph “Be not afraid for this maiden” (XIV, 2), indicating/suggesting that there was no marriage. It also states the charge of Joseph as: "Joseph, You have been chosen by lot to take into your keeping the virgin of the Lord", and not as wife.

"Pseudo-Matthew” (6th century?) has the priests who are giving Mary into his care say to Joseph: “to no other can she be joined in marriage” (VIII, 4), but only refer to Joseph as her custodian. 

The "Book of Mary’s Nativity” and the “Story of Joseph, the carpenter”, however, do mention Joseph as Mary's spouse.

Church Fathers

I cannot find an 'earliest' source that specifically answers the question, but Jerome wrote in his Contra Helvidius that Mary, even though the Angel told Joseph to take her as his wife, does not necessarily cease to be betrothed:


  And although we find it said to Joseph in a dream, Fear not to take Mary your wife; and again, Joseph arose from his sleep, and did as the angel of the Lord commanded him, and took unto him his wife, no one ought to be disturbed by this, as though, inasmuch as she is called wife, she ceases to be betrothed, for we know it is usual in Scripture to give the title to those who are betrothed. 


And also: 


  But just as we do not deny what is written, we do reject what is not written.  That God was born of a virgin we believe because we read it.  That Mary consummated marriage after her childbirth we do not believe because we do not read it.  Nor do we say this in order to condemn marriage, for virginity is itself a fruit of marriage, but because there is no license to draw rash conclusions about holy men.  For if we wish to take the mere possibility into consideration, we can contend that Joseph had several wives because Abraham and Jacob had several wives and that from these wives, the ‘brethren of the Lord’ were born, a fiction which most people invent with not so much pious as presumptuous audacity.  You say that Mary did not remain a virgin; even more do I claim that Joseph was virginal through Mary, in order that from a virginal marriage a virginal son might be born.  For if the charge of fornication does not fall on this holy man, and if it is not written that he had another wife, and if he was more of a protector than a husband of Mary, whom he was thought to have as his wife, it remains to assert that he who merited to be called the father of the Lord remained virginal with her.


Here we see more of that same ambiguity: Joseph had Mary as his wife, but never consummated the marriage. He even wrote "and if he was more of a protector than a husband of Mary, whom he was thought to have as his wife". The Catholic Church appears to have gone with the one interpretation, the Orthodox with the other.

Orthodox sources

The website Orthodoxinfo quotes a book from St. John (Maxomovitch), The Orthodox Veneration of Mary, The Birthgiver of God (Platina, CA: St. Herman of Alaska Brotherhood, 1994), pp. 31-33:


  In the Gospel it can nowhere be seen that those who are called there the brothers of Jesus were or were considered the children of His Mother. On the contrary, it was known that James and others were the sons of Joseph, the Betrothed of Mary, who was a widower with children from his first wife. (St. Epiphanius of Cyprus, Panarion, 78.) 


Orthodox Deacon Fr. John Whiteford wrote the following, supporting that the Orthodox Church affirms the union between Joseph and Mary as a betrothal and not a marriage in order to first affirm the holiness of Jesus through the virginity of Mary:


  This doctrine is not taught for the sake of upholding the sanctity of the Virgin Mary, but because of the uniqueness and holiness of her Son. Consider the following verse:
  
  "Then said the LORD unto me; This gate shall be shut, it shall not be opened, and no man shall enter in by it; because the LORD, the God of Israel, hath entered in by it, therefore it shall be shut." (Ezekiel 44:2).
  
  This has always been interpreted by the Fathers of the Church to be a typological reference to the Virgin Mary and the Incarnation. When we consider that God took flesh from the Virgin's womb, it is not difficult to imagine that this womb would remain virgin.
  
  The bottom line is this has been the consistent and universal view of the Church from the time of the Apostles until today.


Catholic position

Since Joseph had taken Mary into his home, and thus proceeded to the final step, he had accepted the full marriage, but in chastity (as he took this final step without first performing the otherwise prerequisite 2nd step of consummation). Therefore, the Catholic Church sees them as married (forming the 'Holy Family', traditionally of husband and wife in marriage), but just as the Orthodox Church upholds the status of Mary as ever-virgin in order to stress the sanctity and deity of Christ.

In conclusion:

It appears that the Orthodox Church affirms the same idea as the Catholic Church, but from a slightly different angle and interpretation. If Mary was ever-virgin, the marriage was never consummated and as such never officially took place in full, even though the fact that they were betrothed would bestow on them the full responsibilities of marriage, without the privileges. As such he bears the title "Joseph, the Betrothed". 
Catholics argue that while the marriage was indeed not consummated, the fact that Joseph took her into his house (Mat 1:24) shows that they entered in a formal marriage, while skipping the step of consummation. As such, he bears the title of 'Chaste Spouse'. 
Both, however, hold through their respective traditions that Mary was ever-virgin, as a way to point at the divinity of Christ.