Hi: If you write the lagged independent variable in a different manner, you will see why the OLS's optimality breaks down. I will use the AR(1) only because I'm used to that notation and it's a regression with lagged dependent variable.
(1) $y_t = \phi y_{t-1} + \epsilon_t $
Similarly,
(2) $y_{t-1} = \phi y_{t-2} + \epsilon_{t-1} $
Similarly again,
(2) $y_{t-2} = \phi y_{t-3} + \epsilon_{t-2} $
So, since $y_{t-1}$ has $\epsilon_{t-1}$ in it
and since $y_{t-2}$ has $\epsilon_{t-2}$ in it, this means that $y_{t}$ is going to have $\phi \epsilon_{t-1}$ in it and $\phi^2 \epsilon_{t-2}$ in it and so on and so forth.
So, what the regression really turns out to be is a regression of
y_{t} on sums of error terms with decreasing weights of $\phi$ raised to a power :
$y_{t} = \sum_{i=1}^{t} \phi^{t-i} \epsilon_{i} + \epsilon_t$
So, to tie it in with the answer of @Au p, in the lagged dependent variable case, the regressor is not acting as random error but rather as the weighted regressor itself which is a serious violation of the classical assumptions.
#===================================================================
EDIT: I just saw that Christopher Hanck link has some very nice answers. This one has yet another way of looking at it so could possibly still be helpful. At the same time, if I had read that link first, I probably would not have constructed this answer.