That is pretty much exactly what's happening, minus the manual brushing.
A depth map and face recognition is used to locate the foreground subject and a heavy blur filter is applied to the background layer. For the same reason we don't have software today that does perfect (or even halfway decent) automatic masking of faces, the edges become a blurry mess. You don't get any of the beautiful out-of-focus point of light scattering, because the lenses are incapable of capturing it.