Four years after the Dodd-Frank financial law became reality, Washington's regulatory machine is altering Wall Street in fundamental ways.

Banks are selling off profitable business lines, pulling back from the short-term funding market, cutting ties with businesses that could attract extra regulatory scrutiny, and building up defenses to help weather future crises. While profits are up as firms slash costs and reduce funds set aside...