I agree that laws that you can’t enforce sort of just clutter up our legal system. And there are some contexts where this law would be hard to enforce, specifically when it comes to online shopping. In that context people won’t see how much other people are getting charged, so they may not realize that algorithmic pricing is at play. And it’s hard to enforce a law violation when no one knows that it’s going on.
But when it comes to shopping in person, this law would be easier to enforce, since in that context it would depend on people downloading an app to “see” prices. And that seems like something that is very easy to spot and prevent. So at the very least this law will be effective at preventing algorithmic pricing from creeping into physical stores.