How does weathering contribute to soil formation?