Where and when does WordPress invoke routes

parse_query is where the majority of the work is done. Query vars and is_ conditionals are set, and template-loader.php just checks those is_ conditional tags to load the appropriate template.