For most people, their common sense would tell them leaving a car running without the driver can get people hurt or killed. Thus you get this law.
#1: If car engages due to mechanical failure possible dead people.
#2: Some minor goes by, sees the operating car and takes their first self-driving lesson. Possible major problems right there.
Yes, a slightly small chance, but significant enough to not risk it.
If the CA is California then you likely don't understand that nearly everyone who doesn't have a garage in Michigan warms up their vehicle in Michigan in the winter. This guy got a ticket for something almost everyone has done or does...and nobody has ever heard of getting ticketed. That's why it's news. The cop is an idiot.