Intuitively, if you condition on $X_1$ is as though you "know" $X_1$, then it does not have an expected value since its value is known. This clearly covers the case where we condition on $X_1= x_1^*$, i.e. to some specific value. To cover the case where we condition on the $\sigma$-algebra generated by the random variable, we need the integral representation of the expected value. But we are not integrating with respect to the marginal distribution of $X_2$ but with respect to the distribution of $X_1X_2$ conditional on $X_1$ as the expression tells us to. But in this case too, the integrating variable will be $X_2$ only.
We have
$$E(X_1X_2|X_1) = \int_{-\infty}^{\infty} f_{X_1X_2 \mid X_1}(x_1x_2 \mid x_1)\cdot x_1x_2dx_2 $$
Since we are integrating with respect to $X_2$, $X_1$ can go out of the integral, so
$$\int_{-\infty}^{\infty} f_{X_1X_2 \mid X_1}(x_1x_2 \mid x_1)\cdot x_1x_2dx_2 = x_1\int_{-\infty}^{\infty} f_{X_1X_2 \mid X_1}(x_1x_2 \mid x_1)\cdot x_2dx_2 $$
$$= X_1E(X_2|X_1)$$