How to filter a static post page with ajax and $wp_query

The original request that loaded the page you are making the AJAX request from ended as soon as the page was sent to your browser. That connection is closed and it is gone from memory.

When you make an AJAX request, it’s a new request, so $wp_query is empty because you haven’t queried anything. You need to create a new WP_Query instance and query the database, passing whatever query variables you want to set in this query via your AJAX function.