It was important for Joseph to accept Jesus as his son. Not only because the child Jesus needed a father for practical reasons, but also to pass on the birthright of David. The genealogy we read yesterday would be a moot point without Joseph taking this measure. If you think back to the situation of Jacob and Esau where Esau gave away his own birthright for a bowl of beans, the passing of a family heritage was a pretty big deal in Bible times. By taking this step, Joseph, though not Jesus's biological father, included Jesus in his own family line, connected back to David.