Many people hate to see others who are MORE than they are so they use criticism as a leveler to say the least. It is analogous to the crab in the barrel syndrome. They figure that if they are not good enough, then others definitely aren't going to be good enough. Also, there is an element of envy in criticizing others. They know that others are somehow better than they are and are threatened by this. Criticism is a methodology they use to assuage the threat they feel towards others.
Then there are others who are egotistical. They have a superior complex, feeling that they are far better than others in terms of either physical, intellectual, and/or other attributes. They see others as far lesser than they are so they criticize others to show their disdain for others. They criticize others to show that they are superior while others are, in their eyes, inferior.
Many criticize others to help and guide them. In their purview, they are helping and guiding others to be their best and optimum selves. They maintain that by criticizing others by putting out their deficiencies, others will wake up, see the light, and be at their best. They are of the school that there are ALWAYS room for improvement and they are there to do this job.
There are some who criticize others because they do not want the latter to become so complacent or satisfied that they do not want to grow and evolve. They maintain that the only legitimate way for people to grow and evolve is to criticize. A subset of such people avouch that criticism prevents people from becoming too self-important i.e. conceited.