They have a huge, global corporation with many tens of thousands of employees, and a vast array of properties, plus design, research and manufacturing facilities to support.
Aftermarket suppliers have nothing like the above to support, so they sell parts and components much cheaper. Also, most aftermarket suppliers manufacture their products in low-labour-cost countries.
No-one forces you to buy from Caterpillar. There are often many alternatives available if the Caterpillar price is unrealistically high.
Of course, Caterpillar deal with many global mining and contracting companies with huge fleets, and they rarely care what they pay for parts and component prices - so they set the trend for Caterpillar pricing.