The nation might have a law that only recognizes certain marriages, cannot make your interracial or same sex marriage illegal.
Laws which might allow a nation to jail or mistreat gays, cannot be inflicted on a US citizen who is gay.
Laws like the the 24 months of mandatory military service cannot be imposed on a US citizen.
Laws that impose punishments on the dress or behavior of the female citizens of their nation, cannot be forced upon US women visiting that nation.
Every nation has slight differences, but we sign treaties so they cannot impose some laws on US citizens who are visiting there.
In many respects, foreign nations cannot treat you the same as if you were a citizen of their nation, because you are a citizen of the US, and you fall under US jurisdiction.