Why do people act immature at times, especially in difficult situations?
When we are born, we are completely free beings. We are fully in alignment with our true self. There is nothing preventing us from being our true self and loving unconditionally. Unfortunately we are currently raised by a less than loving society, in great part due to the outdated parenting system. We often come into this world to parents and caregivers that are less than unconditionally loving towards us and that try to socialize us.
As children, we are completely vulnerable, as our survival depends fully on the adults taking care of us. We see the love of our caregivers as life, and the lack thereof as death. We therefore internalize everything our caregivers teach us as a matter of survival.
If our parents or caregivers teach us that certain emotions are "bad", and others are "good", that certain behaviors are "acceptable" and others are not, that certain desires are ok, others not, we learn to suppress part of ourselves as children, i.e. we start to practice conditional love towards ourselves, we learn that some parts are lovable, others not. This creates a splintered adult, that has fragmented into acceptable and non-acceptable parts, conscious and non-conscious parts.
For instance, suppose a child goes to a birthday party and feels jealous of the presents her friend receives. Jealousy is a natural emotion just like any other, and if the parent validates the child's emotion, the child can then process it and move on. However, say the parent - due to her own unconsciousness (i.e. unresolved issues) - either gets angry and scolds the child "how can you be jealous with all what you have? you should be ashamed for wanting more", or ignores the child to punish her, i.e. by withdraws love from her. The child internalizes the belief that it is not ok to feel jealous, in fact jealousy is a bad emotion and there is she is bad if she feels it. She must therefore suppress it and not allow herself to process it.
This scenario causes a trauma in the child. The child's emotions are invalidated, as a result the child learns to suppress that emotion instead of allowing herself to process it, and move on from it. The repressed emotion does not simply disappear. It remains, blocked, in the subconscious mind. It will influence the child's thoughts, behaviors and actions unconsciously even as her adulthood. It will act as a point of attraction in her life, leading her for instance into relationships with people who cheat on her and makes her feel jealous. Until she faces the suppressed emotion, i.e. let it free so she can process it and grow from it, she won't be able to resolve these issues.
We can compare the emotional and physical needs of a child as plant buds. Plant buds contain the full potential of a plant, however they need terrain, water, light in order to grow into a plant. Similarly, all the physical and emotional aspects of a child need to be tended to. It is clear that if any physical need is not met, her body will not grow into a healthy adult body. Similarly, if a child's emotional need is neglected, the emotional aspect of that child does not grow into its adult potential, it remains a bud. While the child's physical needs include food, water, shelter, clothing, warmth, etcetera, the child's emotional needs include validation, affection, connection, self-differentiation, being heard, being seen, companionship, feed-back, etcetera.
A very good example of this is developmental trauma. In the first few years of their life, a child must get all their needs met through their caregivers. They identify with the parent as one. At some point during their growth however, an emotional self-differentiation process needs to take place. The child needs to begin seeing itself as separate entity from the parent, with its own needs, wants and desires. In the subsequent phase, the child will learn to meet its own needs, wants and desires. This self-differentiation process is often blocked by the caregiver, due to his or her own unconsciousness. When the child begins to express what he or she wants, or starts to say "no", the parent reacts resentfully, getting angry with the child or, worse, ignoring them, i.e. withdrawing love from them.
In this dynamic the child learns that it is not ok to self-differentiate, and blocks this emotional growth process. He/she remains enmeshed with the parent, does not develop a healthy concept of "self" and, as a result, will not develop the ability to meet her needs, wants and desires. This developmental trauma is often part of a package of traumas that form codependency, a psychological tendency that renders the person unable to form healthy relationships.
By all standards the person emotionally is still a child. She/he might have developed the body of an adult - due to the fact that her physical needs were met - however, emotionally, she never grew to adulthood, at least not that particular aspect.
The emotional aspects of us that remain ungrown, will determine our thoughts, behaviors and actions unconsciously. They will attract situations in our lives that will play back that original trauma, as the suppressed emotions act as a point of attraction in our life. Until we give full attention to those suppressed aspects of ourselves, give them unconditional love and let ourselves process the emotions to let them free, and grow and move on, these aspects will act as a point of attraction.
When these aspects will be triggered, we will react exactly as a child of the age when our trauma occurred. We won't be able to handle the situation as an adult.