Heck, in some states a buyer can't even bring a lawsuit for false advertising, only a competitor can. Because when somebody has lied to me and wasted my time, money, or both, isn't the wronged party really the unrelated person who didn't get to take my money instead?
I'm not sure what legal basis there could be for anti-incompetence laws for web stores, nor how easily they might be passed. It'd likely have to be federal law, in the U.S. (At the state level, there are some nice, simple laws about in-store goods where the shelf says "Price $X", the check-out scanner say "Price $Y", and $Y > $X...)
My approach is mostly to have a long memory, and loose tongue, about such things. And to mostly shop at places considerably more competent and expensive than Target or Walmart.
Strangely enough, it's relatively easy to find stuff at Walmart that won't scan in the app or online, but is found by the registers, so something isn't fully connected.
Target being out of stock can be nice, order online for pickup and then they say they can't find it and ship it instead.
Last time I bothered looking at Walmart's web site, the "best" part of my experience was that I was able to phone the local store, and a live human there quickly told me "No, we do not stock $Item. Ignore what our web store says." This was after Target wasted my time by saying the opposite - then after I drove to Target it turned out to be a lie.
I ended up buying from Macy's - which has plenty of its own issues, but for my n=1 had $Far_More_Upscale_Item on their shelf, a competent sales person on hand, and a sale price less than 2X Walmart's and Target's prices for $Item.
(Another fun story about Target - they stock items which do not exist in their inventory and check-out databases. I once bought a great gift for a friend's granddaughter there...after the in-store security supervisor found it (or pretended to) in some anti-shoplifting security app, and the store's manager made a snap decision on the price.)