For some people, complaining about things provides some measure of relief from the many life stresses they experience. Complaining can provide attention, reassurance, and sympathy; it can feel validating, especially when the listener might agree with what troubles the complainer.
Some people, who are heard to complain a great deal, may do so because they have many troubles. However, there are those who complain a lot who, from our observations, don't really seem as though much is wrong. And then there are those who never complain whose lives seem extremely troubled. Perhaps complaining actually has very little to do with justifiable difficulties; perhaps not much at all. My observations are that the need to complain is determined by factors other than what is or is not occurring in the life of the complainer.