Targeting custom post type via functions.php doesn’t work

If you want to filter the query for a taxonomy archive, you should check if the query is for that archive:

if ( $query->is_tax( 'book_cat' ) ) {
    $query->set('orderby', 'meta_value');   
    $query->set('meta_key', 'published');    
    $query->set('order', 'ASC');
}