A gain in the bank’s earnings was driven largely by certain tax benefits, lower expenses and a decline in the amount put aside to cover credit losses.