Yes, it is confined, but we do respond to punishment, usually by trying to avoid further punishment, which makes us malleable.
My working hypothesis, for which I can provide no proof other than to myself, is that we belong to one gigantic theatre troupe and we all have a part to play. Sometimes we go off script (because we have reflective self-consciousness) and then something happens to push us back into line - a thought, a desire, a threat, an event, a failure to see something. There's nothing we can do to get off the island and each time we try the big rubber ball comes bouncing along the beach and smothers us. There's a tension between a predetermined collective outcome and our individual desires but the collective always wins. What's behind it? I have no idea, it's just how things seem to work.