Pagination 404 on my index.php

The reasons why you should not run query_posts() are perfectly outlined in this answer. Long story short: You overwrite the default query (that happens by WP core) and replace everything that was valid for this request with data that only matches for your secondary query.

  • The function get_query_var() relies on the global $wp_query that gets reset by your query_posts() call. This is what happens inside this function:

    $GLOBALS['wp_query']->get( $var, $default );
    
  • The wp_reset_query() function, does re-sync $wp_query with $wp_the_query. This is what happens in its core:

    $GLOBALS['wp_query'] = $GLOBALS['wp_the_query'];
    

    More details about the how can found in this answer.

Answer: Basically you are nuking all the globals that WordPress relies on. And as plugins need to rely on WP core, you nuke that one as well.