Why cities are where they are

It makes sense that villages and towns would develop a short distance away from each other so that people living nearby wouldn’t have to travel far to sell their goods, bank, or go to school. But what about cities? Geography has a lot ot do with where cities are located.