It's been done in the past. Church laws forbidding the eating of meat on certain days have been a thing. Of course, most people who have the means would choose to eat meat as often as possible, and so you get things like fish not being classed as meat (leaving aside other considerations like these sorts of restrictions acting as subsidies to merchant fishing fleets, with knock-on effects for early modern naval preparedness).
Or people just ignore stupid, unenforceable laws and net respect for the law as an absolute is decreased.