President Trump has repeatedly ousted leaders of independent agencies despite federal laws meant to shield those regulators from politics.