From a psychology/attacment perspective this is the theory:

Children are saying-
Mum/Dad, when I get upset (frustrated, withdrawn, whiney, demanding, out of control), my behaviour actually means that I need you to:
  • Be Calm
  • Take Charge (protect me, comfort me, delight in me, organise my feelings)
  • Stay with me until we both understand this feeling that seems too much for me alone.
  • Help me return to what I was doing with a new option (watch over me, help me, delight in me, enjoy with me).