Cities in the US don't get militaries (but, technically, the federal military isn't allowed to carry out military operations inside cities).
Where this distinction gets muddled is when a metro area is sprawling enough to have many governments. For example, City of Los Angeles has a mayor, but it only represents some of the major neighborhoods of the metro area, while Los Angeles County, which spans multiple cities, has a board of supervisors providing oversight on a more regional scale.
In contrast, San Francisco is a combined city and county with both mayor and board of supervisors: but the Bay Area has 9 counties(more if you count certain outlying cities) with a multitude of city governments, and there is no equivalent to the LA county board unifying representation at the "millions to one" scale - those issues are duked out between different county agencies or pushed up to the state level. Accordingly, Bay Area cities have some more individual freedoms but are much less inclined to cooperate on regional issues and will frequently export problems onto each other.
From what I understand looking around the world, the age of a city seems to define it's boundaries. Cities that were populous prior to the car are much smaller.