It's a good question! The issue is not even mentioned on my  time series books (I probably need better books :) First of all, note that you're not forced to use linear regression to detrend a time series - you could simply differentiate it. If you do use linear regression, then it's true that the residuals are not iid , as you say. Just think of a series which has a linear trend , seasonal components, cyclic components, etc.  all together - after linear regression the residuals are all but independent. The point is that you're not then using linear regression to make predictions or to form prediction intervals. It's just a part of your procedure for inference: you still need to apply other methods to arrive at uncorrelated residuals. So, while lI near regression *per se* is not a valid inference procedure (it's not the correct statistical model) for most time series, a procedure which includes linear regression aso one of its steps may be a valid model, if the model it assumes corresponds to the data generating process for the time series.