Read the court's very long opinion. The basic problem identified by the D.C. Circuit is that the CFPB is an independent agency run not by a multi-member commission (the members of which serve as checks on one another), but by one director (who may only be removed by the President for cause, see 12 U.S.C. 5491(c)(3)). In the court's view, that's more independence from the President than the constitution allows an agency that exercises executive-type power.
The D.C. Circuit allows the CFPB to continue to do its job and severs the offending problem as follows:
In light of Congress’s clear textual expression of its intent regarding severability, and because the Dodd-Frank Act and the CFPB may function without the CFPB’s for-cause removal provision, we remedy the constitutional violation here by severing the for-cause removal provision from the statute. As a result, the CFPB now will operate as an executive agency. The President of the United States now has the power to supervise and direct the Director of the CFPB, and may remove the Director at will at any time.
It then says in a footnote:
We need not here consider the legal ramifications of our decision for past CFPB rules or for past agency enforcement actions. We note, however, that this is not an uncommon situation. For example, in just the last few years, the NLRB, the Public Company Accounting Oversight Board, and the Copyright Royalty Board have all been on the receiving end of successful constitutional and statutory challenges to their structure and legality. See NLRB v. Noel Canning, 134 S. Ct. 2550 (2014); New Process Steel, L.P. v. NLRB, 560 U.S. 674 (2010); Free Enterprise Fund, 561 U.S. 477; Intercollegiate Broadcasting System, Inc., 684 F.3d 1332. Without major tumult, the agencies and courts have subsequently worked through the resulting issues regarding the legality of past rules and of past or current enforcement actions. See, e.g., Noel Canning v. NLRB, 823 F.3d 76, 78-80 (D.C. Cir. 2016); Intercollegiate Broadcasting System, Inc. v. Copyright Royalty Board, 796 F.3d 111, 118-19 (D.C. Cir. 2015). Because, as we will explain in the next section, the CFPB’s enforcement action against PHH in this case must be vacated in any event, we need not consider any such issues at this time.