I hope this may be a constructive suggestion and taken in that vein.
If you disagree with the policy, why not take a batch of cupcakes to the next meeting of your school district's board. (Please adjust the terminology to whatever governing body presides over your particular school, county, state, or country. I'll just try my best with what I know.)
While you're there, talk to them about your concerns. The board members represent you. Voter turn out is usually quite low for school board elections. Board members have good reason to be attentive to issues raise by their constituents. Talk to your friends and neighbors and get them to agree to vote for pro-cupcake candidates. That probably sound flippant, but I'm serious. Elections at this level have hinged on issues like scrunchies for the cheerleaders.
I urge you to be respectful. Most board members are good people who really want to do the best for the kiddos. Pull up your districts website and check out who they are before you go. I think you'll find that most are truly well-intentioned, fine people. (Yes, you'll find a few with questionable motivations, but wouldn't that be a great thing to know come next election?)
And also, be prepared. Maybe Google your state and county regulations governing this issue. Try your departments of health, agriculture, and education. No, they are not real page turners, but you can make fondantyou can figure out how to engineer a wedding cakeyou can do this.
Understand that there really might be some reasons not to have cupcakes in the classroom. Childhood obesity is an extremely hot button topic right now. As you can tell, there are other people who feel strongly about allergies. (On a personal note, I just like to make quick mention of the diabetic kids.)
It'd be a real positive thing to model for your kids. Show them that you don't always have to agree with the law. Show them that there are appropriate avenues to take to try to change things that just don't seem right. Show them that there are steps you can take you don't have to feel oppressed by some nebulous "them."
I stand firm with my statement that most people involved in schools, public and private, really DO care about the kiddoes.