Consider the (electric) vector field
$$\pmb{E}(\pmb{r})=k_e\iiint_V \frac{\rho(\pmb{r_s})}{\lVert \pmb{r}-\pmb{r_s} \lVert^2}\frac{\pmb{r}-\pmb{r_s}}{\lVert \pmb{r}-\pmb{r_s} \lVert}d\tau\tag{1}$$
where $\pmb{r_s}$ is the position vector of a source charge, $\rho(\pmb{r_s})$ is the charge-per-unit-volume at $\pmb{r_s}$, and $\pmb{r}$ is the fixed position vector of a field point.
Suppose we want to calculate $\nabla\times \pmb{E}$.
Here is one way that I saw in a physics book
$$\nabla\times\pmb{E}=\iiint_V\frac{\pmb{r}-\pmb{r_s}}{\lVert \pmb{r}-\pmb{r_s} \lVert^3}\rho(\pmb{r_s})d\tau\tag{2}$$
Here is the step I don't know how to justify
$$=k_e \iiint_V \nabla\times \left ( \frac{\pmb{r}-\pmb{r_s}}{\lVert \pmb{r}-\pmb{r_s} \lVert^3} \right )\rho(\pmb{r_s})d\tau\tag{3}$$
$$=0\tag{4}$$
I am fine with the final step: it results from the fact that $\nabla\times (r^n\hat{r})=0$. But why can the cross product pass through the triple integral?
The cross product only operates on terms in the integrand that are independent of the integration variable. An example may help. Suppose we have a simpler one dimensional integral $I(x)$ where $$I(x)=\int_{0}^{a}\left(x-x'\right)^2\,{\rm d}x'= \int_{0}^{a}\left(x^2+x'^{\,2}-2x x'\right)\,{\rm d}x'$$ $$=x^2 a+a^3/3-x a^2.$$ Then taking the differentiation after the integration gives$$\dfrac{{\rm d}I(x)}{{\rm d}x}=2xa-a^2.......(1)$$ Now take the differential operator ${\rm d}/{\rm d}x$ inside the integral, and perform the differentiation before the integration, to get $$ \dfrac{{\rm d}I(x)}{{\rm d}x}=\int_{0}^{a}\dfrac{{\rm d}}{{\rm d}x} \left( x^2+x'^{\,2}-2x x'\right) \,{\rm d}x' $$ $$=\int_{0}^{a} 2\left(x-x'\right)\,{\rm d}x' =2xa-a^2. $$ in agreement with the differentiation in equation (1) above.
The differential operator, when taken inside the integral sign, only acts on those quantities, namely $x$, that are independent of the integration variable $x'$, and it does not change any of the quantities that depend on the integration variable itself.