Why not showing all post by default in my jquery filter

@HappyArif You just kept a line in your code that needs to be changed if there is a Category selected.

$args = array(
'orderby' => 'date',
'post_type' => 'course',
'posts_per_page' => -1,
'tax_query'      => $tax_query,
);

This have 'posts_per_page' => -1 which needs to be changed to 'posts_per_page' => 9, 'paged' => $paged to make the categorized ajax call as Paged query.

if ( ! empty( $groups_terms ) ) {
$paged = 2; //This needs to be the Paged Request Number.
$args = array(
  'orderby' => 'date',
  'post_type' => 'course',
  'posts_per_page' => 9,
  'paged' => $paged,
  'tax_query'      => $tax_query
);
}
else
{
$args = array(
  'orderby' => 'date',
  'post_type' => 'course',
  'posts_per_page' => -1,
);
}