Cakes are a common form of confectionery in both the Muggle and wizarding communities, often associated with celebrations, comfort, and affection. Throughout the Harry Potter series, cakes serve not only as food but also as significant symbols of kindness, love, and major plot devices. They range from simple, homemade creations to popular commercial sweets sold at magical establishments and can also be enchanted for various purposes.
Cakes can be used as vehicles for magical substances and potions. The most significant example occurs in Harry Potter and the Chamber of Secrets, where Hermione Granger uses magic to embed a powerful Sleeping Draught into two small chocolate cakes. She then leaves them as bait for Vincent Crabbe and Gregory Goyle, causing them to fall unconscious so that Harry and Ron can use Polyjuice Potion to take their forms and infiltrate the Slytherin common room.