What's the point of the bandit to capturing the hero ?
Either you ask for a ransom, sell them or use them.
Ransom is out, because nobody with money know them.
Selling is either organ harvesting (but not very likely in medieval setting, apart for meat/skull) or selling as slave.
Use them is either using them as manual slave, trophy or sex slave. Manual can be possible, but you have to train the slave which is time consuming and dangerous if it's not willing. Trophy slave is possible too, but you have to educate them or physically bind them too (and you don't put them in prison). Sex slave is the most easiest (but not the most lucratif) to do, you can educate or bind them but you can throw the slave wherever you want during or after the capture.
And MC is dumb, abandoning his "friend" to possible torture and thinking "If I save them now, will I be popular ?"... really ?