For non-existence (ie, "don't have" something, or something doesn't exist), the object that you don't have will always be in genitive case. In this sentence, «хлеба» is genitive form of «хлеб».
If you do have something, it will use nominative form. Compare: «У меня есть хлеб» (nominative) «У меня нет хлеба» (genitive)
Source, from the tips & notes of this lesson: 'If you use «нет» to say that there is "no" something or you do not have it, the object is always in Genitive'
In my limited knowledge, it seems to be used to make note of something existing. Negatives don't exist, and I believe in some cases positives don't either. For example, "Хлеб у меня", which means "I have THE bread". I think this is because you're not emphasising its existence, but rather that you have the specific one.
Please correct me if I'm wrong.
According to my college textbook, if the existence of the object is known then есть should be omitted and you're just asking if they have it in their possession rather than if they own any of said object. So you're not wrong, just re-affirming your explanation. (Textbook ISBN: 978-0-470-64632-8, page 88)
So I think I finally understood "genitive" with this one. I put "We do not have the bread." And it got marked wrong with "We do not have bread" should be correct. If I understand correctly, genitive is for when you're just talking about an item in general (i.e., "get some carrots") and not a specific version of that item (i.e. "get me the carrots we have in the fridge"), right?
I suppose you're wrong. It was marked wrong because bread is an uncountable noun in English and so you should not use an article before it. It has nothing to do with an item in general or a specif version. Genitive was used here because of the absence of bread. Just keep in mind that you should always use the genitive case in negative sentences of possession in Russian.