There were frontiermen/indians that trained to be pets, just like Gentle Ben on Grizzly AdamsIt's really easy to underestimate how smart they are.
We were talking with a bear bio in WY once about whether or not griz are smart enough to figure gunshots = food. His response was basically "We have no direct evidence but they can teach bears to ride unicycles in Russia, so anything is possible."