Boki the bear (2 years old) was found to have a condition that I also have. It is known as hydrocephalus, and is caused when the liquid that is found around the brain does not drain away properly. This is often found in infants, but can also occur after a head injury.
When this liquid does not drain, rather than protecting the brain, this liquid squeezes the brain, which apart from being very painful (it usually causes insanity before death, if left untreated in babies) but can take decades to kill naturally.
It seems quite likely, that this bear would have died relatively quickly in the wild, as even if the illness did not kill, it would likely cause different behaviour which would likely have caused more problems.
While it is true that bears have a sweet tooth, which may have contributed to this bears like for it, they are also very intelligent, and may well have been able to connect the idea of feeling better with the medicine that he was taking.