I understand the mechanics of calculating the weights using the propensity scores $p(x_i)$: \begin{align} w_{i, j={\rm treat}} &= \frac{1}{p(x_i)} \\[5pt] w_{i, j={\rm control}} &= \frac{1}{1-p(x_i)} \end{align} and then applying the weights in a regression analysis, and that the weights serve to "control for" or disassociate the effects of covariates in the treatment and control group populations with the outcome variable.
However on a gut level I don't understand how the weights achieve this, and why the equations are constructed as they are.