You answered your own question. It's called marketing, and has been around for over a hundred years. Shirts at ShopMart are $9.97 instead of $10.00 A new car is $15998, instead of $16000. And the list goes on.
There is no significant reason for gas to be sold at $3.24 and not at $3.25 per gallon. However, the number of cents in the difference covers the feds through state tax that is about 22 cents a gallon.