When my grandparents married, my grandfather was 23 and my grandmother was 15. That was back in 1925, and it wasn't unusual.
I would suspect that Joseph was in his late 20s or early 30s because that's how long it took for a man to fully establish himself financially. Until then, it was not uncommon for a man to still be living with his parents--possibly long betrothed to a young girl, but not actually yet married.
Joseph could have become betrothed to Mary several years earlier.
An interesting note in the OT is the difference between Genesis 5 (pre-Deluge) and Genesis 11 (post-Deluge) in identifying the ages at which men fathered their first child. In Genesis 5, it's well after 100 years old, sometimes hundreds of years old.
In Genesis 11, however, scripture seems to normalize the late 20s and early thirties as the age of a man's first child. I don't think that's an irrelevant point--I think the Hebrews probably did normalize age thirty as the age most men fathered their first children.