What is the meaning of [one man’s loss is another man’s gain]

People profit from the misfortunes of others; also used more literally