Originally, according to John Jamieson's 1808 Dictionary of the Scottish Language, it meant "the shipwreck which is driven ashore by waves" in the Orkney and Shetland Islands. Presumably this means they felt that God would wreck the ships so that the islanders could benefit from salvaging them.