This is an excerpt from Edward M. Purcell's Electricity & magnetism:
Suppose a spherical shell of charge is compressed slightly, from an initial radius of $r_0$ to a smaller radius. This requires that work be done against the repulsive force $\dfrac{\sigma^2}{2\epsilon_0}$ for each square meter of the surface. The displacement, being $dr$ , the total work done is $\left(\dfrac{\sigma^2}{2\epsilon_0}\right)\left(4\pi r_0^2\right)$. This represents an increase in the energy required to assemble the system of charges, the energy $U$: $$dU =\dfrac{\sigma^2}{2\epsilon_0}r_0^2\sigma^2$$. Now, notice how the electric field $E$ has been changed. Within the shell of thickness $dr$, the field was $0$ & is now $4\pi\sigma ^1$. Beyond $r_0$, the field is unchanged. In effect, we have created a field of strength $E= \dfrac{\sigma}{\epsilon_0}$, filling a region of volume $4\pi r_0^2 dr$. We have done so by investigating an amount of energy given by the above equation which, if we substitute $\epsilon_0 E$ for $\sigma$, can be written as $$dU = \dfrac{E^2 \epsilon_0}{2} 4\pi r_0^2 dr$$. This is an instance of a general theorem: The potential energy $U$ of a system of charges, which is the total work required to assemble the system, can be calculated from the electric field itself simply by asssigning an amount of energy $\dfrac{E^2 \epsilon_0}{2}dv$ to every volume element $dv$ & integrating over all space where there is electric field.
$$U = \dfrac{\epsilon_0}{2} \int_\text{entire field} E^2 dv$$
My questions are:
1)What is actually meant by assembling of charges? To bring the charges to make the desired arrangement, right? In order to find the energy, wouldn't we need to find the work done from bringing the charges from infinity to the desired configuration?? But here, Mr. Purcell just squeezed the sphere & found the energy required to squeeze the shell against the repulsive force! How can the energy required for squeezing be the energy required for assembling the charges? I am not getting the intuition. Please explain.
2)$^1$ How can $4\pi\sigma$ be the field? How did he deduce it? Moreover, can anyone tell me what he is saying in the second para?