As mentioned elsewhere, it's because sales tax varies from state to state and from county to county. So if you're going to advertise something for a given price, you either have to exclude sales tax or accept that you'll be making significantly less profit selling it in California than in Oregon.
It's a crazy system, but state and local governments are dependent on sales tax revenue so it's impossible to dislodge.
The system in the UK isn't exactly sane either though, as I recall from the fact that everything at Pret is advertised with an "eat in" and "take away" price since the two scenarios are taxed differently. If you say you'll take it away but then change your mind and eat it in, you're presumably in serious (theoretical) trouble.
And then you've got the Australian system which is at least invisible to the consumer but is still annoying and inconsistent to the merchant. It was going to be a consistent 10% applied to everything, but the minor left-wing parties insisted at the last minute that it needed to exclude some but not all forms of food. Meanwhile feminists have been agitating for years to get tampons excluded as well... not because any analogous male or unisex product (toilet paper?) is excluded but because they have apparently run out of any serious problems to complain about.