Yes, the OCPD would need to be rated for the smallest conductor on that circuit even if those splices were not within the panel. So you could leave the panel with a #10 AWG conductor and splice a #14 conductor AWG to it some where down the line. The OCPD would then need to be 15 amps. As Jeff stated splices are fine due to NEC 312.8.
David- when I see larger conductors spliced to smaller conductors in a panel like that it raises the “aluminum wire” red flag. That’s not always the case, but I’ve found it more than a few times. Just a thought.
I would assume the major concern is the possibility that this would be an indication of the the presence of otherwise unsuspected aluminum banch circuit wiring.