San Francisco’s ban on McDonald’s Happy Meals goes into effect today. But because the law bans only giving away toys with certain meals, restaurants are set to comply with the law by selling the toys.

Now, not only can kids still get toys with their burger and fries, but McDonald’s will earn an extra dime per sale and donate the funds to its charity, the Ronald McDonald House. Unsurprisingly, the Occupy McDonald’s crowd is furious. The San Francisco Examiner’s Joshua Sabatini claims that McDonald’s is “skirting” the law, while self-styled public-health lawyer Michele Simon alleges that McDonald’s is “exploiting” kids.

To me, the company is simply complying with the law’s provisions. It’s clear, however, that the legislation these activists pushed — with the ostensible purpose of making unhealthy food less attractive to children — hasn’t done any good.

But the food-police movement has never, at its essence, been much about helping people become healthier. If it were, it would focus a bit more on getting us to exercise. The movement’s favorite exercise is the exercise of control — over other people.

It is no wonder the food police feel right at home with the Occupy Wall Street movement. Their mutual disdain for allowing markets to operate makes them wonderful tent-fellows. In fact, food cops are now partnering with OWS at rallies across the country. In a rally in New York this November, they called for “No more corporate feeding of America.” Does this mean they want only the government and charities to feed us? (And don’t corporations fund government and charities?)

And on Twitter, @OccupyBigFood spent the days before Thanksgiving calling for a Butterball Boycott. Note to the corporate officers of leading fruit-cake makers: Start giving away your profits, or you will be the next target.

Solidarity between OWS and the food police should be no surprise, because what offends both groups is corporate profit. For nanny-staters, it really never was about just helping people fight obesity or get healthier. The nanny-state activists are, at their core, anti-capitalist.

Claiming that anti-corporate policies will improve the nation’s health is an effective tactic for getting more people to subscribe to this approach. All activists have to do is to convince the public that too many Americans are overweight, that we need to do something about it, and that cracking down on food corporations will do the trick. Americans too busy to think through the issues rely on activists such as the Center for Science in the Public Interest, academics such as Marion Nestle, and columnists such as the New York Times’ Mark Bittman to tell them what constitutes effective food policy.

Don’t think that just because the Happy Meal ban isn’t going over so well that we’ve got a reprieve from the food police. Evidence that an initiative isn’t working should lead to a different problem-solving approach. But not with this crowd.

Consider New York City’s requirement that chain restaurants post calorie counts to fight obesity. The city instituted the program in the spring of 2008. Activists touted it as an experiment that would prove the need for a nationwide law requiring calorie counts on menu boards — not just on serving trays and websites — so consumers could take calories into account before ordering. No, the law isn’t overly intrusive, but it also didn’t work.

In a study published in the International Journal of Obesity in February, NYU School of Medicine professor Brian Elbel and his colleagues studied receipts from inner-city kids who ate at restaurants with the menu boards both before and after they were posted as required by law in New York City, as well as from children in Newark, N.J., where calories were not posted as prominently. The study, funded by Yale University, the Robert Wood Johnson Foundation, and the National Institutes of Health, found that calorie counts did not affect kids’ choices. But it was too late to matter.

Instead of waiting for data on the New York experiment, activists rushed the requirement into law as a little-noticed provision of Obamacare. How did proponents of the law respond to the study? Instead of admitting the plan didn’t work, they used it as a rallying cry for even more intrusive interventions. Expect the same strategy in the fight against the Happy Meal. In fact, Ms. Simon is already responding to the McDonald’s move by saying, “The fix is to stop all marketing to kids, not give industry more clever ways to do so.”

Happy Meal bans, soda taxes, and other favorites of the nanny-staters are bound to continue making headway — not against obesity, but against individual choice, personal responsibility, and, yes, corporate profits. Only when Americans realize that the food police are motivated not to help us become healthier, but to impose their ideology on us, will we have any chance of a return to rational food policy. Only then might we be able to explore health-improving ideas based on science, choice, and personal responsibility. Inevitably, the solutions will come from the private sector, not despite it.

— Jeff Stier is a senior fellow at the National Center for Public Policy Research in Washington, D.C., and heads its Risk Analysis Division. Follow him on Twitter at @JeffAStier.