Cake is mostly sugar, fat, and refined flour, and chocolate cake is outright toxic. A crumb of plain cake on a special occasion won't harm a bird, but it's junk food, not a treat to offer regularly.
Plain cake isn't poisonous, but it's nutritionally empty and sugar-and-fat-heavy. Chocolate cake contains theobromine (toxic), and many cakes have other risky add-ins. The 'birdie birthday cake' idea is better served by a fruit-and-millet arrangement than actual cake.