Sort:  

I thought they'd attack if they encounter small groups on foot.

Yes, probably if you run on them really close by surprise. However, close encounters are quite rare and you usually see them from hundreds of meters away, in which case both the human and the bear try to typically avoid the confrontation.

Nice, now I want to go and see a polar bear :)