From Old Japanese. Originally a compound of 業 (waza, “deed, doings”), in reference to the doings of the 神 (kami, “gods, spirits”) + 這い (hai, “spreading widely”, literally “crawling”). Compare the etymology of 幸 (sakiwai, “good fortune”). Compare also the connotations of the English term act of God in reference to disasters.
Often spelled 災い with the trailing okuriganaい to make the reading more explicit.