They actually played a pretty important role in early civilizations. For one, building a major urban civilization takes a lot of work. Slaves could be used for building projects to enlarge the city and its defenses, for agricultural labor to ensure that the people of the city could eat, or as domestic assistants to kings, lords, and shop-owners.