Joseph took Mary to Bethlehem, because all males had to go to their home towns to be registered.
This was required by the Roman census in occupied Israel for taxation purposes.
The Romans had a census, or head count, every fourteen years.
Joseph in Hebrew means: increaser.
Joseph Goes To Bethlehem
1 In those days Caesar Augustus, who ruled from 27BC to AD14, issued a decree that a census should be taken of the entire Roman world. 2 (This was the first census that took place while Quirinius was governor of Syria.) 3 And everyone went to his own town to register.
4 So Joseph also went up from the town of Nazareth in
Galilee to Judea, to Bethlehem the town of David, because he belonged
to the house and line of David.
Joseph and Mary were both descendants of King David. Israel's royal family.
Mary and Joseph had an arranged marriage as was the custom of the time. The papers that made it legal were signed at the time of the arrangement of the marriage. This may even have happened before the two people had met, not like our western custom where the legal papers are signed at the time of the marriage.