If the lugs of the panel were listed for 2 wires, and the OCPD and feeder wires were sized for the load, then there is no violation of the NEC.

This may be a poor design choice but not a NEC violation.

Chris