One of the benefits of children having imaginary friends is: the imaginary friend helps them meet various intrinsic psychosocial needs.
Having imaginary friends is a way of practicing social skills and learning social interaction. It is actually a milestone, because simulating a social being or a character needs understanding a lot about another person. Imaginary friends are created at a time when children are becoming more socially aware. It also helps them develop how to control their emotions.