get_category display only 1

Added an argument for the $categories
Input the ID of the parent to display all the subcategories.

function ba_SearchFilter($query) {
    if (!$query->is_search) {
        return $query;
    }
    if (isset($_POST['cat'])){
        $query->set('category__and', $_POST['cat']);
    }
    if (isset($_POST['tags'])){
        $query->set('tag__and', $_POST['tags']);
    }
    return $query;
}
//hook filters to search
add_filter('pre_get_posts','ba_SearchFilter');

function ba_search_with_filters(){
    $out="<form role="search" method="get" id="searchform" action="". home_url( "https://wordpress.stackexchange.com/" ).'">
    <div><label class="screen-reader-text" for="s">Search for:</label>
        <input type="text" value="" name="s" id="s" /><br />';
        $args = array ( 'child_of' => 1 );
            $categories=  get_categories( $args ); 
            foreach ($categories as $category) {
                $option = '';
                $option .= '<input type="checkbox" name="cat[]" id="cat[]" value="'.$category->term_id.'"> ';
                $option .= $category->cat_name .'<br />';
                $out.= $option;
            }
    $out .='<input type="submit" id="searchsubmit" value="Search" />
        </div>
        </form>';
    return $out;
}

add_shortcode('search_with_filter','ba_search_with_filters');