Sometimes I try to make a bread but the texture comes out more like a muffin even when I use a loaf baking pan. I have even tried premixed bread (similar to premixed boxed cakes) and while the taste is nice, the texture is not what I am looking to have. I'm trying to figure out what ingredient gives bread that coarse texture versus the smooth texture of muffins. I am thinking along the lines of coarse crumby breakfast type breads or dark breads you generally have with coffee such as Friendship Bread. b
Multiple factors give cake and bread its distinct attributes:
Fat/sugar content: a bread is generally very lean. Most traditional breads do not have any fat or sugar in it at all. Cake will generally have a high fat content from either butter, oil, or milk. Breads will taste "drier" than cake because it lacks this fat content. Cake will also have a large content of sugar compared to bread. Often case the sugar is creamed with the butter to give the batter some of its structure. The more air that is incorporated into the sugar/butter mixture the "lighter" the cake will be.
Leavening: Cakes will be leavened using baking soda and/or baking powder. This type of chemical leavening is very quick and will result in lots of little holes within the dough resulting in uniform "soft" texture. Bread on the other hand is primarily leavened using yeast and requires time for the yeast to eat the simple sugars in the dough and produce carbon dioxide which creates the bigger and uneven holes in the bread.
Preparation of batter/dough: Cake will very often use AP or Cake flour which are low in gluten. These cake recipes will generally ask you to "mix until just incorporated." This is to insure that the batter is evenly mixed but not over mixed. This is to prevent gluten formation. Bread on the other hand want this gluten formation so it uses a flour with high gluten content such as bread flour. The kneading and working of the bread dough will align these gluten strands and give the bread the dough structures that make it chewy and "bready."
Note that breads like banana bread, and zucchini bread fall under the category of quickbreads which is actually more a cake than a bread.
In addition to @Jay's answer I would like to add that using yeast as a slow leavener allows a gluten network to develop. Gluten makes the dough chewier and retains more moisture than equivalent baked goods with little or without gluten. Gluten doesn't develop because of the addition of yeast but rather the time for hydration of the dough with a gluten-containing flour (no-knead bread). Kneading enhances the gluten development.
Generally speaking, gluten is not desired in cakes. Chemical leavening works faster (almost immediately) than gluten can develop properly.1 In addition, fat inhibits gluten development, thus contributes to a tender crumb.
1 However, if you work too slow and overmix the batter, gluten will develop anyway.