The term Economies of agglomeration is used in urban economics to describe the benefits that firms obtain when locating near each other. It is related to the idea of economies of scale and network effects, in that the more related firms that are clustered together, the lower the cost of production (firms have competing multiple suppliers, greater specialization and division of labor result) and the greater the market that the firm can sell into. Even when multiple firms in the same sector (competitors) cluster, there may be advantages because that cluster attracts more suppliers and customers than a single firm could alone. Cities form and grow to exploit economies of agglomeration.
There are of course also diseconomies of agglomeration. Additional competition drives down pricing power. Large cities attract problems of crowding and congestion. It is this tension between economies and diseconomies that allows cities to grow, but keeps them from becoming too large.