For years, animal behavior was explained as instinct or routine survival. New research is expanding that view.