It’s probably something they would have never imagined happening, because the social divides that existed should have prevented it (a Hebrew in the palace). But the favor of God was so obvious on Joseph, and the situation so dire for Egypt that desperate times called for desperate measures. What happened though is that Joseph thoroughly assimilated to Egyptian culture once he became second in command. So a lot of people probably had no idea he was a Hebrew, or forgot, until his family eventually came to town. Awkward.