This Puritan tradition to appease God’s wrath became a Maine holiday