That's a complicated question. But I'd start by pointing out that the taxi laws certainly don't have the consent of the governed behind them. If they did, Uber would never have taken such a big chunk of the taxis' market share.
When the laws do not respect the people, the people will not respect the laws. That's not a statement of moral value, it's a statement of fact.
When it comes to emissions controls, though, even the worst lawbreakers among us need to breathe.