There are "cottage" food laws which allow the sale of baked goods, jams and jellies. But foods that require refrigeration after preparation are typically not covered.
https://ij.org/issues/economic-liberty/homemade-food-seller/ has a fairly good state-by-state summary. You'll note that even in the "dark green low regulation states", only Wyoming and North Dakota have no restrictions; Utah, Montana, and Oklahoma restrict meat.
edit: You seem to be in the UK. The regulatory environment is a lot more lax there. Inspections and approvals seem still to be required [1], but that's different from the general prohibitions found in the US.
As a personal note, the sickest I have ever been in my life was from food poisoning. The details are horrific, but imagine 3 days of violent diarrhea while at the same time throwing up. I couldn't even hold down water. My arms looked like, its hard to explain... the skin was draped over them. You could see every sinue of the musculature like I was a body builder, except I was a fat 30 year old. I went to the hospital and took 4 liters of saline.
All I did to earn that punishment was eat a few slices of pizza that had been left out too long.
If you please, the saga of the "pink sauce", which is the exemplar of why food safety has to be regulated:
This short podcast about food safety questions has been fun to listen to, if slightly concerning occasionally. www.riskyornot.co
Is there some line between "selling food to the public" and "selling it online" that you think is important?
Success leads to more success. Be happy that California has made an improvement; it will be used to make things better in your state next.
I'm pretty sure that this is the same in lots of countries.
— Related story, cos it's arguably more interesting than the argument here... My friend makes and sells a Chilli Jam, from homegrown chillies. Just once a year. He used to make his jam batches at home. But ran afoul of the various rules and regulations that make up UK food law. So now he simply gets himself some time in the kitchen of an already established restaurant to make his batches, because it's much easier than setting up one's own home for such a business — particularly for a single annual batch.
Edit: sure, one could easily argue that the UK is an over-regulated hellhole, I guess /shrug
A similar example is home brewing beer. Obviously, Prohibition happened in the 20s and 30s and it was heavily regulated afterward. It wasn't until the 70s when it was legal to home brew beer. You still hear craft brewers complain about the laws around distribution for smaller guys.