Here's why:
* P-waves are compressional waves, meaning they travel by compressing and expanding the material they pass through. This allows them to travel through both solids and liquids.
* S-waves (secondary waves) are shear waves, meaning they travel by shaking the material perpendicular to their direction of travel. S-waves can only travel through solids, as liquids cannot support shear stress.
Since the Earth's outer core is liquid, S-waves cannot pass through it. P-waves, however, can travel through both the solid inner core and the liquid outer core, albeit at a slower speed in the liquid outer core.