Apple comes up with the industrial design (case) and a spec sheet, but the actual circuit design and manufacturing are all outsourced. The cost per se, is control = poor QC from beginning to end.
Apple does seem to still do their own R&D (i.e. interface patents,... articles you see on the front page recently).
But when it comes to designing the actual product (circuit design, PCB layouts, ...) they don't do that any longer. They outsource to Foxconn (Hon Hai Precision is the actual company name; Foxconn is their retail brand).
Given what they charge for the same circuits as anyone else, Mac users should demand more. The current QC issues are unacceptable for that kind of money, and seem to be getting worse lately from what I can tell (more and more problems reported lately across different lines).