Speaking as someone who has spent the better part of his life as the sidekick, I think they don’t get enough credit. Now I’m not complaining about having been a sidekick. Quite the contrary, it was great fun. There’s a lot you can get away with going unnoticed in someone else’s shadow.
In stories though the sidekick is more than just the guy seeing what he can do while everyone else is watching the star of the show. In literary terms, he or she serves as the foil. Not aluminum foil. Not the fencing sword thing. And no, the purpose is not to ruin anything.
A foil serves as a counterpoint to the main point. Your hero seems more heroic in the face of the sidekick’s doubt. The ingenuity of the hero shines compared to the concrete thinking of the sidekick. A heady romance of sweeping emotions overwhelms the practical concerns of the onlooking sidekick.
Think Watson to Holmes. Think Sancho Panza to Don Quixote. Think D’Artagnon to the rest of the Musketeers. Think Robin to Batman, but only if you can do so without giggling at the homoerotic undertones.
At the very least, think about those ancillary characters as more than just convenient plot points. The more fleshed-out and real you can make them, the more depth you can add to your protagonist either in contrast or in compliment to the attributes you give your sidekick. It’s just another layer of depth available to the careful author.