Some cities range across counties. Some cities have taxes that the county itself doesn't, so literally crossing the street into the unincorporated part of town can save you on sales tax. Sometimes sales tax is suspended based on who you are. Sometimes sales tax is suspended on what time of year it is.
Sales tax is complicated. I get why companies would rather outsource that to the register to look up at the end.