How could Athens preach the virtues of democracy, but still allow slavery?

I’ve got a project to do on Athens and Sparta, so please make sure that it’s the right answer.