Bank of America gave up billions in annual revenue by phasing out certain fees and risky banking products.