Occasionally this is unavoidable--shipping charges. If they simply pass through what UPS charges, fine. Otherwise, they should be listed up front.
With regard to shipping charges, don't you choose your shipping options and get to see the price before buying?
Sales tax is also usually added in at the very end, again because it depends on where the buyer is.
The difference here is that the "hidden junk fees" are just extra money they charge, with no real defence. For example, Ticketmaster loves their arbitrary "convenience fee", Airbnb was long known for "cleaning fees" (though they've improved here), etc. These are things that the seller knows they're going to charge beforehand and clearly they do this purely to trick our brains into thinking things are cheaper.
Here in Sweden, if the amount isn't clearly presented, there's no agreement to pay the specified amount, so there's no contract and no obligation to pay-- an agreement becomes binding because of the reasonable expectation of a party on the counterparty.
I don't understand American contract law, since I even see ideas like changing agreements, which are completely contrary to the very notion of a contracts as I understand it, so it's nice that something is done about these strange practices.
I don't understand how it's come to this point though. That courts have been willing to tolerate things that aren't in the contract (i.e. changes to contracts), provisions that aren't clear, etc., and complex and strange provisions even in contracts of adhesion and things presented to consumers.