Terrible generalization of polynomials is useful for demonstrating overfitting (I've done it myself in tutorials). However, responsible tutorials should mention that the other obvious lesson is that the polynomials (1, x, x², x³, etc) are a <i>terrible</i> set of basis functions for regression. Don't just watch for overfitting, but use a sensible regression model! For complicated fits some methods to consider are: local regression, splines, various artificial neural nets, or Gaussian processes.