Some people say it's trickery, but when I apply the razor I find pricing errors more likely to be the result of stupidity than of malice.
Having worked in retail myself, I understand that some days there just isn't time to get it all done. A debt of unfinished tasks can accumulate. It happens. Sometimes old prices get left up. (I think the stupidity is on the part of management more than it is the employees, but it's still more stupid than it is malicious.)
---
Dollar General got into the thick of it with the Ohio Attorney General a couple of years ago[1] over this issue: The prices on the shelf didn't always match the prices at the register. Stores were closed[2] while they updated their price tags to match reality.
And as part of the settlement with the Ohio AG: Nowadays, when I go into a Dollar General and Red Baron pizzas are on the shelf for $5 and they ring up at $7.65, they're required to honor the posted price of $5 when I bring this up to them.
(That last bit really should be enshrined in law instead of the footnotes of a legal settlement with a single entity, but alas: It just isn't that way in Ohio.)
[1]: https://www.ohioattorneygeneral.gov/Media/Newsletters/Consum...
[2]: https://www.supermarketnews.com/foodservice-retail/ohio-ag-d...