How to Realize the Sigma Point Sampling Function in Unscented Kalman Filter?
In any Kalman Filter one need to calculate the 1st and 2nd moment of the data under the transformation.



The image above taken from The Unscented Kalman Filter for Nonlinear Estimation
by Eric A. Wan and Rudolph van der Merwe

The problem is that there are some transformations which their linearization (As done in the Extended Kalman Filter - EKF) yield the wrong evaluation of the mean and covariance.
Then the Unscented Transform comes to help and able, using only few data points from the data prior to the transformation to estimate those moments pretty good in many cases.

Why does it work?
One way to look at it is through the analysis done in Cubature Kalman Filters (CKF) which is a generalization of the UKF.
The problem there is solving high dimensional integrals weighted by Gaussian Kernels.
This problem can be solved using the Gaussian Quadrature method which is a numerical method to solve high dimensional integrals.
The problem is basically done by selecting pre defined points in the data and their weights and summing them to calculate the integral.
This is just what's done in the UKF (unscented Transform to be exact).