Cities have no representation at the federal level, so we can leave those out of the question.
Why have states? Why indeed!
One answer: to create a level of governmental organization smaller than the federal one that can act as a set of laboratories for legislative and legal experimentation.
Another answer: to reflect the fact that not all laws and regulations make sense across a diverse range of climate and geography and demographics and economies.
Neither of those answers, however, require states to be considered inviolable sovereign entities, and a lot of us born after 1880 don't think of them that way.