One needs a hard reality to work against.
Martin Luther said that God punishes us through intermediaries like Satan, and I had asked about that.
Now to the other part of your question, why (are people punished) through the world and Satan? Immersion in the world—with its causal networks, its guilty resistance—is necessary for growth. One needs a hard reality to work against that conditions one’s actions and experience and decisions. Otherwise, nothing would be serious.