Everyone went to his own town to be registered.
He went to be registered with Mary, who was promised in marriage to him, and who was expecting a child.
Now in those days a decree went out from Caesar Augustus to register all the empire for taxes.