Usually, we assume the mean value of error is zero. If it's not, you can add a constant to the model to make the mean value of error zero.
Therefore, you are left with the squared term.
Var(\epsilon) = E[\epsilon^2] - E[\epsilon]^2 = E[\epsilon^2]
because $E[\epsilon]$ = 0.
The Breusch–Pagan test is to test if there is heteroskedasticity in the residual of the linear regression. The heteroskedasticity means that the variance of residual changes by the independent variable. Roughly speaking, the variance of residual is the same as the square of the residual because the mean of residual is zero.
(There are more stories behind. The mean of residual is set to be zero in terms of the unconditional mean. On the other hand, the squared of residual is the conditional variance as it depends on the independent variable.)