Cake is food that behaves like furniture. It is placed as a block and eaten in slices where it stands, never from the inventory, and once placed it cannot be picked up again — breaking it destroys the whole thing. Seven slices come off it, one bite at a time, and like any other food it only goes down when you are actually hungry.
The cake recipe is unusual in that it hands most of itself back: the milk buckets are emptied rather than consumed, so the standing cost is only the wheat, sugar, and egg. That makes cake the natural payoff for a base that already keeps cows, chickens, and sugar cane, and a farmer villager will sell one outright once it has traded up a few ranks.
Being a real block opens uses ordinary food does not have. Setting a candle on an uncut cake makes a candle cake, which can be lit with flint and steel; taking the first slice snuffs the candle and drops it back for reuse. A comparator placed against a cake reads how many slices are left, so redstone can tell an untouched cake from a half-eaten one and refill a stand automatically.
As a survival food source it flatters to deceive. The slices refill the hunger bar respectably but carry very little saturation, so fullness drains again quickly — cake belongs in a base with a bed nearby, not in a pack bound for the Nether. What it is genuinely good at is being shared: a placed cake serves several people from one craft, which is why it ends up on tables, in build centerpieces, and at the middle of server celebrations.