The story
From the resemblance of the round, black fungus to the burned cakes in a legend according to which King Alfred, hiding out in a countryside homestead during war, was put in charge of some baking cakes and accidentally let them burn.
Etymology from Wiktionary, CC BY-SA 4.0.