To constrain the impact of preexisting mechanical weaknesses on strain localization culminating in macroscopic shear failure, we simulate triaxial compression of layered sedimentary rock using three-dimensional discrete element method simulations. We develop a novel particle packing technique that builds layered rocks with preexisting weaknesses of varying orientations, roughness, and surface area available for slip. We quantify how the geomechanical behavior, characterized by internal friction coefficient, μ0, and failure strength, σF, vary as a function of layer orientation, θ, interface roughness, and total interface area. Failure of the simulated sedimentary rocks mirrors key observations from laboratory experiments on layered sedimentary rock, including minima σF and μ0 for layers oriented at 30° with respect to the maximum compressive stress, σ1, and maxima σF and μ0 for layers oriented near 0° and 90° to σ1. The largest changes in σF (66%) and μ0 (20%) occur in models with the smoothest interfaces and largest interface area. Within the parameter space tested, layer orientation exerts the most significant impact on σF and μ0. These simulations allow directly linking micromechanical processes observed within the models to macroscopic failure behavior. The spatial distributions of nucleating microfractures, and the rate and degree of strain localization onto preexisting weaknesses, rather than the host rock, are systematically linked to the distribution of failure strengths. Preexisting weakness orientation more strongly controls the degree and rate of strain localization than the imposed confining stress within the explored parameter space. Using the upper and lower limits of μ0 and σF obtained from the models, estimates of the Coulomb shear stress required for failure of intact rock within the upper seismogenic zone (7 km) indicates that a rotation of 30° of σ1 relative to the weakness orientation may reduce the shear stress required for failure by up to 100 MPa.