generally when a mfg puts bikes/parts on sale, they will also offer discounted pricing to dealers. If it's something already in stock that was bought at the original wholesale price, you can usually price match and then get a credit for the difference.
As far as something being listed for sale but then being out of stock, yeah, that shit happens sometimes. Probably it's part of a larger sale that's still going exists still at local shops, more are on order from the factory, etc. Say you go into a store and find the tire that's sold out online. Would you rather the website has gone back to listing msrp, or the sale price?
The "find at a local shop" option on sites will usually miss a lot as shops have to be on like trek or specialized pos systems or at least have some sort of an online inventory tracking system and then opt into it. Which is definitely not going to be every shop. Especially when they'll try to pull shit like "oh we saw you sold X item so a new one has automatically been ordered and sent to you here's the bill."