Adding table classes to Drupal tables

Got this snippet from Twitter bootstrap theme

<?php
function tweme_preprocess_table(&$variables) {
  if (isset(
$variables['attributes']['class']) && is_string($variables['attributes']['class'])) {
  
// Convert classes to an array.
  
$variables['attributes']['class'] = explode(' ', $variables['attributes']['class']);
  }

 
$variables['attributes']['class'][] = 'table';
 
// $variables['attributes']['class'][] = 'table-striped';
}
?>

Shouldn't this be included in the template.php (Or the include files), or is there a reason why its not.