Why suffering can be good