The best explanation of how bondholders and banks serve a similar function is:
both are holders of someone else's debt.
Bondholders lend money to issuers (such as corporations or governments) in exchange for interest payments and the return of the principal at maturity, while banks lend money to borrowers and receive repayments with interest. In both cases, they are essentially holding debt that someone else owes them.