The Roman census that required every family go back to their hometown did not happen (why would it?). Romans kept very good records of censuses and such an event would be well covered.
So why does the Bible have this story? The best guess is that Jesus was well known to have come from Nazareth. Yet the older messianic texts say the Messiah would be from Bethlehem. The gospel author undoubtedly was trying to square that circle to make sure the prophecy was fulfilled. Something they'd not need to do if Jesus wasn't real. The author had to explain to people who had grandparents who knew him as being from Nazareth why that still jives with older prophecies.