The bank’s retreat in parts of investment banking marks a change after a long journey in the business