Discuss the theoretical underpinnings of structural mechanics and its significance in analyzing and designing load-bearing structures in mechanical engineering. How do theoretical concepts such as stress, strain, and deformation influence the behavior and integrity of materials under mechanical loading, and what theoretical frameworks guide the optimization of structural designs for strength, stability, and durability?