Ricci Curvature Meets Sub-Riemannian Geometry