Our weight acts as a contact force through our feet, on the ground - on the sand. The higher the area over which this force is spread, less is the compressive STRESS that acts on the sand under the feet. Stress is defined as the force (= weight, in this case) per unit area.
Sand cannot withstand much stress (compressive or shear) as it is not rigid like steel and gives in - gives a way easily to the leg. When the area is more, stress is less and sand under both feet could take that.