Yes that can be true but often times people act nice or preach morality when they cannot assert themselves or attack some aggressor. I think we have this association in our mind that associates niceness with cowardice. My personal experience : When you are kind to people,people start taking you for granted.
Being nice is a desireable quality once you are in a relationship in order to make the relationship longer and stable.However in order to get into a relationship you need many more qualities.Being nice will get you nowhere when you are trying to find a relationship.