This is a very good question.
"데려오다" takes human or animate objects, while "가져오다" takes non-human/animate objects as in:
나는 강아지를 데리고 옵니다. 나는 내 친구를 집으로 데리고 옵니다.
vs.
나는 가방을 집으로 가지고 옵니다.
I don't know what grammatical terms the grammar books use, though. Or perhaps this explanation could be further elaborated. But this is what I know as a native speaker. Hope this helps.