Though only six lines long, "Fog" deals with a number of themes. First, there is the theme of nature, which Sandburg explores through the medium of fog. In the poem, the fog is a creeping, living entity which descends on the human world (the "harbor" and the "city") without any warning. That it can descend in this manner, without any warning, reinforces Sandburg's belief that nature is more powerful than anything that humans can produce.
Secondly, Sandburg explores the theme of change. When the poem opens, for example, the city is calm and quiet, but it changes rapidly when the fog descends. The fog, therefore, acts as a force for change, transforming the city into a misty place. In the final line, the fog "moves on" as quickly as it arrived, suggesting that change is an unavoidable and natural process.
Poetry could be interpreted in so many different ways depending on the reader and even the emotional state of the reader. Additionally, Sandburg's brevity and natural language make it seem like the poem is about nothing else other than fog closing in around a harbor city and then moving out. Is Sandburg trying to say that fog is like a cat or that cats are like fog?
It's more likely that the theme that Sandburg is trying to convey to his readers is nature's uncaring attitude toward mankind. It is obvious from the poem that the fog and people exist within the same space, but it's also clear that the fog (nature) has a sort of aloof attitude at the intrusion of mankind in its space. A cat is a perfect animal to further illustrate that since cats tend to be fiercely independent and quite aloof toward just about everything. Thematically, I think Sandburg is showing his reader that people are a part of nature, but nature isn't about to bend to the will and desires of people. It is uncaring and will do what it pleases.