I was born and I live in Italy. To answer your question, «Tengo un cane» is indeed a way to say «Ho un cane», but it is a dialectal form. I live in Northern Italy, but in Southern Italy this is used (especially in Naples).
«Tenere» is used in other contexts. To keep the dog example, you can say «Mi puoi tenere il cane per un po' di tempo?» to say «Can you take care of my dog for some time?». Other examples are:
as in the example sentence, «tenere» with the meaning of keeping it somewhere: «Dove tieni il pane/il latte/l'acqua?»
as in the English expression «Hold me, otherwise I will fall.» - «Tienimi, altrimenti cado.»
as in the English expression «Keep me a seat/Hold a place for me» - «Tienimi un posto/Tieni un posto per me»
as in the English expression «Which team do you root for?/Who's your team?» - «A quale squadra tieni?», even though «Per quale squadra tifi?» would be more appropriate here.
and many other.
I think that "tenere" still works in sentences like the one in the example of duolingo - so it still works with the function of the word "keep".
So when you talk about a person, that have a dog for a long time (for example)(and didnt receive the dog a while ago xD) you say: You have a dog - Tu hai un cane. But YOU DONT SAY You keep the dog - Tu tieni il cane. (It sounds funny and it's just changing the whole sense of the sentence, LIKE IN ENGLISH.)
But when you talk about the bread and you just want to know where the person you talk to is keeping it, it's normal to use "tenere" and "avere", like in english it's normal to use "keeping" and "having".
Hope you understood me. The point of my comment is that the thing which we are talking about works the same in italian as in english.
(I have been living in Italy for few years).
Not sure. I also had this first, but then realized that there's peobably a difference in meaning. To keep the bread is more like refering to the usual place of storage, to have the bread does not have that specific meaning - to me at least (not a native Englush speaker). Maybe it is similar in Italian.
So seems like "tenere" doesn't equal with the Spanish "tener", but it's more like "guardar" (keep) instead. But "guardare" neither equals with the Spanish "guardar" because it means "mirar" (look). And the Spanish "tener" in Italian is more like "avere" which is not the same as "haber" in Spanish, although it works similar in present perfect.... I think I've just got mindf*cked :O