A couple of reasons: either the yeast was not activated enough (possibly the water was too hot or the dough was not allowed to rise long enough) or the dough wasn't kneaded for long enough. To rectify, always ensure that your activated yeast is thick and bubbly like this and that you knead the bread for the time noted on the recipe.