In many online machine learning courses and videos(such as Andrew Ng's coursera course), when it comes to regression (for example regressing $Y$ on features $X$), althouth we have the closed form estimator for regression coefficient $\widehat{\beta}=(X'X)^{-1}X'Y$, and based on this we could come out with the prediction at $X_i=x$ as $x'\widehat{\beta}$. This is simple and no numerical optimization is needed. My questios are:
given the simplicity of the closed form regression estimator (and predictor), why do machine learning courses typically ignore it, and only focus on gradient descent?
what's the merits of teaching regression in this way?
Also, what's the relative merits of gradient descent in both practical performance?