It was made with nutmeg, ginger, cinnamon, and raisins, and stamped with a cross on top that symbolized a soul being saved from Purgatory. The earliest soul cakes were placed outside homes to prevent mischievous spirits from playing tricks on All Souls' Day, but eventually, the sweet buns were baked for real-life trick-or-treaters.
Source: The History Channel, NPR