The Marriage of Mary and Joseph (detail)

In the middle ages contracts, including the marriage contract, took place in fromt of church portals. Only after their vows would the bride and groom be taken to Mass inside the church. Thus the marriage of Mary and Joseph also came to be pictured as taking place in fromt of a temple entrance.