Devotion to St.Joseph developed slowly in the church.
Early Christian stories originating in Syria and Egypt from the year 150 onward depict him as an old man, a widower, who marries the Virgin Mary and faithfully cares for her and the Child.
The image of an aged Joseph usually appears in medieval art, drama and poetry. It is the common image of Joseph in the Eastern churches.
The image arose because an aged Joseph would more likely ensure the perpetual virginity of Mary. And if he were a widower, the brothers of Jesus mentioned in the gospels (Mt.12:46) might refer to Joseph's children by a previous marriage.
Scholars today generally dismiss these characterizations. Joseph was most likely a young man, not previously married.
Venerable Bede (+735) summed up early Christian thought about Joseph's role:
questions or comments