It makes better sense to see it as an expansion on Joseph’s obedience to the angelic instructions that underlines the absence of his own involvement in the extraordinary conception of this child by the Spirit.
Why does the author bother to tell us if it has nothing to do with anything/no one knew any different/it had no impact on Jesus’ life