WooCommerce custom query and paging: Not Found error

It has to do with the posts_per_page being 2 and the backend WordPress Settings being a greater value. If you set your WordPress Settings to 2 it will work. But you may not want all your pages to have two posts. In that case you can alter the query using the code in this answer, Pagination Throws 404 just for that archive page.

Here is the code to put in your theme’s function.php file.

if( !is_admin() ){  
add_action( 'pre_get_posts',  'set_per_page'  );
}
function set_per_page( $query ) {
    global $wp_the_query;
    if($query->is_post_type_archive('product')&&($query === $wp_the_query)){
    $query->set( 'posts_per_page', 1);
    }
  return $query;
}

This changes the posts_per_page before running your query. Then when you get your posts it has your query with the dynamic variable posts_per_page. So if that number is 3, you will get your 3 products per page and no 404 error.