Why does Marty make a promise to Shiloh

A.He loves him and doesn't want to see him hurt again
B.He is talking to himself to pass the time since Shiloh was just a dog
C.He feels he owes the dog for whistling to him that first time
D.He doesn't know that dogs don't understand promises