What does structure matrix do
At each pixel $p$, this $2\times 2$ matrix summarizes the local behavior  of the image (structure) inside a neighborhood of pixel $p$ (a neighborhood weighted by function $w$.

From this matrix, different quantities can be computed, that provide interesting attributes for image analysis. Structure tensors, or second-order matrices, have been used for image segmentation, especially with geodesic or level-set methods, as they can provide insights to image textures or orientations.