here have some mood whip lash (at least its a happy ending)
headcanon that Cujo was not put down humanely instead he was one of those horrible cases of puppies thrown in the garbage. Danny happened by where cujo was abandoned, but by the time he found him he was to far gone and died in dannys arms on his way home to take care of him. Danny was horribly upset by this puppys mistreatment and subsequent death.
This is why Cujo is so attached to danny as a ghost, the only person who showed him any kindness in life and the only person who cared about his death. Cujos agression is mostly aimed at those who mistreated him. I like to think Cujos ghostly obsession changed from the toy that was his comfort item, to Danny and having a more normal dog loyalty to Danny and living out the life he didnt get to.