Override tax_query with pre_get_posts to include other term_ids on a single category

but now it seems, I have two tax_queries, one is in
WP_Query->query_vars and the other is just in WP_Query

That is normal.

  • WP_Query::$query_vars is an array of query vars merged with the default ones for WP_Query.

    So if you do $query = new WP_Query( array( 'post_status' => 'publish' ) ) (or $query = new WP_Query( 'post_status=publish' )) and then later do $query->set( 'tax_query', array( ... ) ), then $query->query_vars would contain both post_status and tax_query, as well as other vars like posts_per_page, post_type, etc.

  • WP_Query::$tax_query is an instance of the WP_Tax_Query class and is used by WP_Query for generating the SQL’s JOIN and WHERE clauses for the taxonomy query (tax_query) in the $query_vars array.