It’s all psychology. Our human minds are tricked when we see such digits, we do not conceptualize $599 as equaling $600. Additionally, everyone wants a deal, and we feel that $599.99 is somehow a bargain compared to $600. And as mentioned above, if you had a budget of $20 and saw something on sale for $20 you may choose not to buy it, but could be persuaded to buy it if it were marked as $19.99 (even though both will have taxes applied).
Personally, I prefer honesty, and would appreciate having not only whole numbers, but after tax prices on shelf tags. I make do with the unit per price breakdown (such as cents per ml on cans of tomato sauce).
Marketing is primarily psychology based. There is literally tons of research regarding it, as many companies do revolve around getting as much money as possible. If Coca-Cola can entice you into buying one more can of their coke by putting shiny large dripping ice cubes on the images around the machine, then you bet they are going to do so. They spend tons of money finding things like this out, doing market research, test groups, etc, to fully milk any chances of you buying their product. I’m sure there are tons of books written by folks who’ve investigated such things, such as the book “Fast Food Nation” by Eric Schlosser (focuses more on the general fast food industry, but contains lots of great info).