Rectify signal basic question
The only reason I can think of may be to preserve the frequencies over which original signal had spectrum (before squaring). When you square a signal $x[n]$, whose spectrum $X(e^{j\omega})$ extends from  $-\omega_0 \le \omega \le \omega_0$, you are multiplying by itself. So in frequency domain, the effect is to (periodically) convolve $X(e^{j\omega})$ by itself.
$$
S(e^{j\omega}) = \int_0^{2\pi} X(e^{j\theta})X(e^{j(\omega - \theta)})d\theta
$$
The convolution will result in $S(e^{j\omega})$ non-zero over $-2\omega_0 \le \omega \le 2\omega_0$. If you had upsampled before squaring, the spectrum before squaring would have been non-zero only from $-\omega_0/2 \le \omega \le \omega_0/2$. So after squaring (convolution in frequency domain), its spectrum is still $-\omega_0 \le \omega \le \omega_0$.