More often than not people respond to us as we treat them. If we're mean to people they're going to be mean back. Ditto friendly.
Of course, there are always those kind souls who are friendly no matter what, and there are always nasty people who take pleasure in being mean.