Rohit Chopra had led the Consumer Financial Protection Bureau since 2021. Consumer groups praised his leadership, while Republicans have frequently attacked the agency.