But the ban caused much, much more damage than needed to remedy the externality. If mispricing were the problem being solved, they could slap an appropriate tax on the stores' bags, and then stores would pay it, fold it into prices, implement policies to discourage too many bags, roll their eyes, and move on.
Instead, the bag law means they must explicitly charge the customer for bags; they can't just absorb it into prices (as every store did before).
(And I don't know if you've ever worked as a cashier, but adding another step to every transaction gets old really quick, and holding up a line so someone can dig for a dime because they forgot to ask for one the first time around is ridiculous.)
Furthermore, ten cents is (by any reasonable back-of-the-envelope measure) far more than the magnitude of the externality, and it's not put into a fund to remedy the externaliites, nor can I get the ten cents back when I redeem it and thereby prove that it's not going into some bird's lungs.
This is just like most hastily-considered conservation policies: penny-wise and pound foolish. I'm likewise hounded to cut back on showers, despite them producing far more economic value than uses of water that are basically value-destructive (growing alfalfa) and which get a free pass. Similarly, I get paid nothing for having an ultra-low-carbon lifestyle, while people get large government subsidies to make their already-wasteful lifestyle a little less so.
Yes, it sucks when externalities aren't priced in. But we shouldn't use that justification as carte blanche to overcharge for the wrong ones.