[US] Why don't city limits just follow county lines or vice versa?
My city's limits covers one county and half of the county north of it. Why don't they just follow the same lines on the map, with either the county following the city, or the city following the county line?
In the United States, cities and counties are the creations of state or territorial law, so you'll find a lot of different variations. Using California as an example, the counties are the first-level political subdivision, dividing every bit of land in the state into 58 pieces, some smaller and some bigger. Exclusively within each county, a city can be incorporated by the will of the people living there, either as a general law city or a charter city. The former uses some default rules prescribed by the state (usually suitable for small towns, which California law still calls a "city") and the latter being a mini constitution that allows creative municipal administration (eg "strong mayor" systems).
Incorporating a city removes the power and responsibility from the county to manage that territory and its affairs, giving that to the city government. It is a specific rule in California that no city can span two counties: hence adjacent cities like Sacramento and West Sacramento, that are in different counties.
Compare this system to Louisiana, which uses county-like parishes. Or to New York City, which is one big city made from five counties, each being the same territory as the five constituent boroughs of the city. Oh, and California has one "consolidated city and county" in the form of San Francisco, where the city expanded to include all land in the county, so the difference was meaningless and they merged the two.
So while counties are consistent in covering all the land in a state, cities don't necessarily follow consistent rules or reasons. More often, they follow population patterns (sometimes gerrymandered to include prison populations, for example) or to grab natural resources (eg Sacramento River waterfront).
Edit: I should mention that the smallest "towns" in California basically exist in name only, being Census Designated Places (CDPs) of the county. They have only their normal county representative, although CDPs tend to also have a county-level committee made of locals to advocate for their town, in front of the county Board of Supervisors.
They are entirely separate concepts, in the US at least. Counties are a common way for a state to subdivide its territory, and are related to State government. While Cities tend to have an entirely separate governmental structure, subordinate to the State government, but still a separate local government.
Where I live, there is a Federal government and State government, of course, but also a County government. Then, I happen to live in a Village, which is also part of a Town, within the County.
So, I have no less than 5 entities I owe tax to. Six, if you count the School District separately. (Which I do, since it can also levy taxes). Fun!
The county lines were likely drawn 100-200 years ago. The method will vary by state, but is usually either in a grid or following some geographical features. Where people live probably wasn't directly taken into account.
Cities lines are drawn as needed, and as cities expand, it just depends on where the population growth is. For mature towns/cities, they may be butted up against adjacent towns, so expansion is driven by whichever people are otherwise "unclaimed."
But why do cities expand in the first place? Money, prestige (which brings more money), adding services to under-served residents, etc. The question they're asking when it comes time to grow the borders is, 'will this bring in more money than it costs in a reasonable amount of time?' It can be expensive to add services in some areas if they're expanding water/sewer/police/fire/electric/etc, but the additional tax revenues may be worth it.