setAttrs is meant to accept an object parameter. If you pass an array instead (for example, by passing a value to _.map instead of _.mapObject), setAttrs will set attributes with the index values of the passed array (treating the array like an object with numeric keys), instead of throwing an error and/or doing nothing.