Phase response of moving average filter -- how to interpret?
The frequency response of a causal length $N$ moving average filter is

$$H(\omega)=\frac{\sin\left(\frac{N\omega}{2}\right)}{N\sin\left(\frac{\omega}{2}\right)}e^{-j\omega(N-1)/2}=A(\omega)e^{j\phi(\omega)}\tag{1}$$

Note that $A(\omega)$ is not the magnitude of $H(\omega)$, but it is a real-valued amplitude function, which takes on positive as well as negative values. The phase $\phi(\omega)=-(N-1)\omega/2$, as defined in $(1)$, is obviously linear. That's also the common definition when we talk about a linear phase response.

The phase you plotted is not $\phi(\omega)$, but $\hat{\phi}(\omega)$ as defined by

$$H(\omega)=|A(\omega)|e^{j\hat{\phi}(\omega)}\tag{2}$$

The difference between $\phi(\omega)$ and $\hat{\phi}(\omega)$ is that whenever $A(\omega)$ crosses zero, a phase jump of $\pm \pi$ occurs in $\hat{\phi}(\omega)$, corresponding to a sign change in $A(\omega)$. Nevertheless, we still refer to $H(\omega)$ as a frequency response with a linear phase, because $\phi(\omega)$ is a linear function of $\omega$.

Note that in practice, a linear phase is only relevant in the pass band of a filter, i.e. in a frequency region where no zeros of $H(\omega)$ occur. In the pass band, also $\hat{\phi}(\omega)$ is linear, because it only jumps at the zeros of $H(\omega)$.