So according to Merriam Webster bread is:
a usually baked and leavened food made of a mixture whose basic constituent is flour or meal
And cake is:
A: a breadlike food made from a dough or batter that is usually fried or baked in small flat shapes and is often unleavened
B: a sweet baked food made from a dough or thick batter usually containing flour and sugar and often shortening, eggs, and a raising agent (such as baking powder)
And yet some people don't think that cake is bread.
I think it's that people like certain levels of specificness. Like, bread, pizza, and broccoli are all foods, but if you said "I had a food for lunch" that'd sound weird.
It's not necessarily that cake isn't a type of bread or that the two aren't closely related. It's that we have a super-common and more specific word for it (cake) so it sounds awkward when you use a different word that might be technically accurate, but is a weird choice in practice.
Same for a lot of things. A hot dog and a sub are technically the same thing. But if a waiter dropped off your hot dog and said "here's your pork sub", you'd probably look at them funny.
Something can be breadlike without being bread, in a similar way to how whales are fishlike without being fish.
The dictionary doesn't dictate how words should be used; it reports how people use them. Consulting a dictionary is a way to find out how "lots of people" use a word.