The problem was not the federal bill (which didn't have any national standards in the final bill) but in the CA legislature impinging on interstate trade by passing a bill requiring out of state producers to comply with CA standards.
I think the general rule is that states may set standards that exceed federal standards for in state business but can't ban the sale of out of state products as long as those products meet federal standards.
I don't know what the legality is of banning products for which there are no federal standards. It seems like a clear violation of the commerce clause, but I don't sit on the Supreme Court.
I would think if farmers from other States don’t want to change the size of their coops they don’t have to but they also don’t have to sell their eggs to CA.