And of course, on the other hand, sometimes parents are wildly partial and treat their children very differently which the individual children accept as normal, and internalise. Sometimes there is no wailing about an extra ice-cream, but instead acceptance that one child chooses their own new clothes while another is chosen clothes from seconds stores; one child is played with and another is shut out; one child is kept at home, supported through tertiary study (despite failing every second year) and given the use of a car, petrol provided, while another is moved out of home at 18, and given no help or support.
The favoured sibling and I have always been close, and I accepted the situation until it was pointed out to me as an adult. Then I accepted it because I was an adult, but I was curious to find just how very unequal had been the sharing of resources.

Another family, close friends of ours, had four children. When the first was born the mother was in her teens. She was apparently nagged at by her own mother who told her she was spoiling her baby. In reaction to this, the new mother defiantly neglected that child. It was clear to all that the child was treated as a sort of Cinderella, always harshly spoken to, scorned by the mother and treated more harshly if anyone spoke up for him, never lifting his head, smaller than the others and never allowed to be comforted. This went on for the whole of his time at home. As a child I wondered what he could have done, or what he could be that the mother loved the other children and was warm and caring to them but openly disliked him, and was hostile and scornful to him.
In this case there was no rivalry. This child would never have dared to set himself up against a sibling, or initiate conflict with his mother.
Wailing about an ice-cream sounds more like old fashioned greed.