This is actually one of the best arguments for the existence of a historical Jesus I've heard - from the late Christopher Hitchens, actually. The only plausible reason someone would feel the need to invent the story of the family traveling to Bethlehem (the imperial decree is most probably completely made up and there are plenty of other plot holes) is because people already knew about a figure known as "Jesus from Nazareth" that needed to somehow be connected to Bethlehem in order to fulfil the messianic prophecies.
If Jesus was a completely made up figure (an idea that is implausible for other reasons) the writers of the gospels could just have made him come from Bethlehem and be done with it. But, since Jesus the Nazarene was already a known figure among their audience, they couldn't do that.