Most of the times it is because there is not enough liquid or sauce coating the pasta as it bakes. In this recipe the spaghetti is coated with Alfredo sauce which keeps the spaghetti from drying out.