Why is society greedy during the war in general?

I don't know that society as a whole is greedy. Having lived through several wars, I didn't see much evidence of greed. However, there always a few people who will take advantage of any situation and find war time may be a profitable time to get rich.