I don't know that I think in terms of hero and sidekick all that much, but it seems to me that if you want a protagonist to have someone who makes a good partner, they have to complement each other in some ways, unless you are doing mentor/apprentice.
Batman and Robin are mentor and apprentice, but often (depending on when and which Robin) complementary characters, with Batman being cool and controlled and Robin more impulsive and emotional. (As a sweeping generalisation over a long and complex character history)
Holmes and Watson are not exactly mentor and apprentice, but they are mentor and apprentice shaped in that Holmes explains things to Watson all the time. To some extent Watson is a foil to allow Holmes to explain stuff to the reader.
Jack Aubrey and Stephen Maturin are a great example of complementary equals. Jack Aubrey knows ships in great detail and is a defastatingly good and competent naval commander. Stephen Maturin falls in the sea a lot can cannot remember the simplest nautical terminology. Jack Aubrey is a hopless naif on land (and blithely unaware of it), and is taken in by the simplest swindle. Stephen Maturin on land is a lethally sharp intelligence agent. What that allows that series of books to do is firstly, to have a complex and real balance in the friendship, who takes care of whom and how. And secondly, that whatever is actually going on, be it a sea battle of a complex political intrigue the author has the choice of putting the reader in the head of a) someone who knows nothing about it and needs everything explained to him or b) someone who is very good at it indeed and can plausibly handle it well and to a successful conclusion, and the combination of this is great for getting information to the reader.