All the chef shows I have watched suggest this,but I usually forget. I just made Spaghetti Aglio e Olio last week and the recipe called for this method.
"
That said, I learned on our trip to Italy that I had actually been making this dish wrong in years past, when I used to just toss spaghetti in the garlicky oil once it had finished cooking. The key to creating a gorgeous, glossy, non-greasy sauce is to create an emulsion with the garlicky oil and that magical starchy pasta water (the key to most good pasta sauces!). All you have to do transfer the pasta and a half-ish cup of that hot starchy pasta water directly into the pan of garlicky oil one minute before the pasta is done cooking. Then while you toss the pasta, all of that heat and starch will help the garlic oil emulsify into a beautiful glossy sauce, while the pasta soaks up some extra garlicky flavors as it finishes cooking."