Why do the widths of confidence & prediction intervals change across a regression line - shouldn't it be the same with i.i.d? I thought that we assume i.i.d and therefore identically distributed (constant variance) over the line? But aren't the below saying that technically the distribution changes from one X value to another?
Example images of confidence intervals:


I thought that we assume i.i.d and therefore identically distributed (constant variance) over the line? But aren't the above saying that technically the distribution changes from one X value to another?
Edit
I think what I'm saying may be better described by the below image.
If we had enough data and could theoretically make a slice at each value of x_1, so as to obtain a theoretical conditional probability distribution of x_2 | x_1, wouldn't we expect this distribution to be the same around the best fit line for all x_1, for it to satisfy i.i.d? In the case of say normally distributed prediction intervals that widen as we go further from the centre of the data, it seems to me that we're suggesting the variance is not constant and therefore the distributions are not identical for all x.
Sorry if this makes no sense.


Lukas has already given a very comprehensive mathematical explanation. I just want to add a quick note about a misunderstanding in your question.
The linear regression model assumes IID errors on the dependent variable $y$, for a given model $\beta$, i.e. $p(y|x,\beta)$. The prediction intervals you are looking at are most likely representative of something like the posterior predictive distribution, which provides a distribution of possible unobserved values conditional on the observed values. In other words, given some training data $(X_t,Y_t)$, the posterior predictive is the distribution of new observations, given the training data, marginalised over all possible models: $$p(y|x,X_t,Y_t) = \int_{\beta} p(y|x,\beta)\,p(\beta|X_t,Y_t)\,d\beta.$$ So, the reason the intervals are wider in some places than others is not due to the observation error (which is constant, according to the IID assumption) but rather to the larger uncertainty about the position of the regression line in those regions.
