Concept:This is an inverted third conditional sentence that refers to a past situation that did not happen.
Explanation:"Hadn't it rained" means "If it had not rained."
The full meaning is: If it had not rained, it would not have been so bad.
Since this is a past unreal conditional, the reality is the opposite of the condition.
So it actually rained, and the situation was actually bad.
Therefore, the rain is what made the situation bad.
Answer:D. It rained and that made it so bad.