A government-backed emergency loan program for small businesses struggling to survive the COVID-19 pandemic was supposed to be a surefire payday for banks.

Indeed, many banks will earn millions from the Paycheck Protection Program: More than 30 banks could earn as much from emergency small-business loans as they reported in net revenue for all of 2019.