The sorting of posts by a meta_query with two keys fails while separated as single queries it works

You can only sort on 1 meta value. A few posts (including this SE answer) suggest adding a filter to change the order.

Add a function to your theme’s function.php file that will replace the sort order:

function change_sort_order( $orderby ) {
    return str_replace('wp_posts.post_date', 'mt2.meta_value, mt1.meta_value',  $orderby);
}

Then use it where you want. Make sure you remove the filter after it’s used so that it doesn’t stay in effect once you’re done with it.

$args = array(
    'post_type' => 'courses',
    'meta_query' => array(
        'relation' => 'OR',
        array('key' => 'class_day'),
        array('key' => 'class_start')
    )
);
$the_query = new WP_Query( $args );

add_filter('posts_orderby','change_sort_order');
$loop = new WP_Query( $args );
remove_filter('posts_orderby','change_sort_order');