colorbox is used for more than one UI element, I think the following code is used to handle a conflict with the colorbox Drupal module and is redundant except for that.  If this is true then it should be reflected in the inline documentation.