Other companies make their profits on low margins and very high volume. Apple has hogher margins and prefers to make theirs on higher-quality, lower volume products.
What makes you (and others) think that the quality of Apple products is higher than average? According to a recent study in my country, the percentage of laptops bought since 2004 that have not needed repair were as follows grouped by manufacturer (5728 respondents):
IBM/Lenovo 89.0 %
HP 86.7 %
Acer 84.7 %
Toshiba 84.4 %
Packard Bell 83.0 %
Dell 82.8 %
Medion 81.9 %
Apple 78.8 %
Fujitsu-Siemens 78.5 %
Zepto 68.0 %