Shame is related to performance and anxiety. But it can also be other people projecting unto you because of their own lack of control. Shame is also connected to fear, fear of not performing and fear of looking silly in public.
If you are intelligent you can build your own model of morality from which you can then figure out why and why not to be ashamed of certain things.
Is being naked shamed? Why? Everyone saw your naked ass when you were a baby and when you're old they'll wipe your bum and see it anyway.
The illusion of competition pushes us all towards stress and anxiety. Realize that the only person you're competing against is your older self.
If you realize that there's no need to feel shame for something then you stop feeling it.