Sales taxes vary based on city, county, and state rates. They can also be waived if you, the buyer, have a reseller permit or are purchasing for a non profit.
It's not underhanded and is annoying for sellers too because they have to know a lot about sales taxes as well. They could show you the price with local taxes included but then most customers would think their prices are too high comparing to other merchants.
So the price shown on the product in a store or online is only what the merchant is selling it for. The price at the register is what the merchant is selling it for plus the taxes they have to collect (unless you're excluded for the reasons mentioned above).
The tax is a buyer obligation, not a seller obligation but sellers have to be an intermediary. So buyers should be educated about the tax laws that apply to them (in this system).
The receipt should be clearly marked so you know exactly how much went to the product and how much went to tax. You can itemize and deduct your sales taxes from your federal income taxes if you're so inclined to track it (and it's a better result than the standard deduction)
It's more complex than a VAT system but enables local jurisdictions to levy taxes to pay for various things applicable to their area.
๐คทโโ๏ธ