The metaphor of Israel as the wife of God receives several potent and shocking midrashic reinterpretations as the rabbis reflect on Israel's suffering and persecution.
The rabbis of the talmudic era were more interested in the human response to suffering than in finding theological justifications for its existence.
Suffering & Evil in Judaism
If the Torah guarantees rewards to the righteous, why do some righteous people suffer?
Early Jewish writers were more concerned with the randomness of suffering than with its actual existence.