Moses and the final plague of Egypt are the reasons behind Passover. The firstborns of the Hebrews were 'passed over' because of the lambs' blood painted on the doorway.
It was actually due to the first census. At the time people were told to go to the place they were from and report there. Joseph being the decedent of David had to travel from Nazareth in Galilee to Judea his own birthplace and to Bethlehem the place of David's birth. Mary being his wife had to go as well to report as his wife.
Comments