I find that it depends on the player and the length of the ban, for example swearing, we ban a player for 6 hours automatically when they swear (I think 6 times), this is harsh yes, but I think it has (for some people) reduced the amount that they swear. However there are those people that still continue to swear because the ban doesn't matter as much to them.
The more lengthy the ban, the more effect it may have, people enjoy playing the game, and hence stopping them from doing so could have an effect, and the more time that goes by, the greater the effect, however I agree that it doesn't matter to some people. Other punishments for different cases may be used, such as jail or mute, and etc, however kicking players seems to have little effect on those who intend to cause trouble. It has also occurred before that players have had items removed from them in cases such as x-ray.