Being ashamed about nudity is i beieve a totally different thing. The shame op is talking about is feeling bad when you have cheated your neighbours, or being ashamed of doing something that lands you in jail i.e. caring about your reputation as a good human. Nudity in public is completely orthogonal to any of that imho, and is more of a cultural norm.