The village had originally been a gathering of several shinobi and their clans,
but when a group of people lived somewhere, they naturally ended up wanting places that would make them food. And of course, there was a demand for stores that would sell daily necessities as well. Following that logic, it was natural that another group of people would appear with an eye on the village full of customers.