Study says friends are most valued in cultures where they may be needed most