From a legal perspective, I think the ruling is reductio ad absurdum correct. California voters passed Proposition 65. Consequently, CA Health and Safety Code 25249.6 says "No person in the course of doing business shall knowingly and intentionally expose any individual to a chemical known to the state to cause cancer or reproductive toxicity without first giving clear and reasonable warning to such individual, except as provided in Section 25249.10". Section 25249.8 mandates a list, and defines "known to the state"
A chemical is known to the state to cause cancer or reproductive
toxicity within the meaning of this chapter if in the opinion of the
state’s qualified experts it has been clearly shown through
scientifically valid testing according to generally accepted
principles to cause cancer or reproductive toxicity, or if a body
considered to be authoritative by such experts has formally identified
it as causing cancer or reproductive toxicity, or if an agency of the
state or federal government has formally required it to be labeled or
identified as causing cancer or reproductive toxicity.
Acrylamide is so listed, and has been for 18 years, reason code listed as "AB-IARC, AB-US EPA". The law does not say that "the benefits may outweigh the risks", nor does the law say anything about usual doses. There is an "escape clause", if one (the defendant) can prove that there is no effect (25249.8(b)):
An exposure for which the person responsible can show that the
exposure poses no significant risk assuming lifetime exposure at the
level in question for substances known to the state to cause cancer,
and that the exposure will have no observable effect assuming exposure
at one thousand (1000) times the level in question for substances
known to the state to cause reproductive toxicity, based on evidence
and standards of comparable scientific validity to the evidence and
standards which form the scientific basis for the listing of such
chemical pursuant to subdivision (a) of Section 25249.8. In any action
brought to enforce Section 25249.6, the burden of showing that an
exposure meets the criteria of this subdivision shall be on the
The answer on Skeptics does not address the EPA finding (and the science underlying it). At this point we can only conjecture about the defense's scientific argument (the ruling is still in the works, pending feedback from parties), but the judge said "While plaintiff offered evidence that consumption of coffee increases the risk of harm to the fetus, to infants, to children and to adults, defendants' medical and epidemiology experts testified that they had no opinion on causation" and that the coffee makers hadn't presented the proper grounds at trial to prevail.
Insofar as human subjects testing of suspected carcinogens is illegal, any argument that "but this only shows that it causes cancer in rats" is legally empty: rats are a suitable proxy for humans. This is a state report addressing a potential carcinogen, 4-Methylimidazole. The report notes that to have a No Significant Risk Level finding, the substance must have less than a "daily intake level posing a 10^-5 lifetime risk of cancer". A further requirement is that "risk analysis shall be based on the most sensitive study
deemed to be of sufficient quality" (whatever that is). This study mentions a previous study which was rejected because "these studies do not meet the criteria specified in Section 25703(a) because the experiments were not designed to adequately control for and examine the potential carcinogenicity of 4-MEI". Basically, Spiegelhalter's argument is too meta, and doesn't constitute a proof that acrylamide poses no risk of cancer.
If the defendants commissioned an independent scientific study to overcome earlier carcinogen findings, perhaps the study failed on technical grounds. The bar that has to be cleared is very high. The EPA regulation says that the maximum contaminant level goal for acrylamide is zero. That is the carcinogen-science basis for specific allowable levels in water supplies.