California law is supposed to allow a necessity defense, the fact is they knew the farms were abusing animals (they had undercover people find employment with them and see first hand, which is legal and not trespassing) and they found the same abuse on the day.
You're definitely allowed to break into a car to rescue a baby. You might also be allowed to break into a hot car to save a dog, in which case you should also be allowed to break into a poultry farm to save abused animals.
They didn't deny they broke in, but said there was good reason. The judge refused to allow the reason to be heard, and furthermore refused to file briefs from legal experts. What's more, the prosecutors declined to proceed with the various theft charges, instead opting for a misdemeanor trespassing charge and suping that up with a felony conspiracy charge. Making a felony out of a misdemeanor and not allowing the defense to be heard points to a coordinated attempt targeted solely at the leader of this campaign group.
Thanks. I think my other comment made soon after gave a bit better detail on the laws: