In comics sidekicks came in during the early days as a way of giving juvenile readers their own insert character who they could identify with… Bucky Barnes, Jimmy Olsen, Robin etc. They had other functions like giving the hero someone to save, providing commentary, reaction and exposition. Later when that kind of sidekick fell out of favour they became superheroes in their own right.
...but there are so many clever an interesting ways to use sidekicks!