How does the theory of plasticity contribute to the understanding of material behavior in structural elements, especially in analyzing the deformation and failure of materials?