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.