Not build quality, quality control. The iPhone has the best build quality of any mobile device. This is also why the quality control is so poor because it's so hard to make.
Apple has actually made some major changes to it's manufacturing process to reduce issues if you read around.
I feel like it's both. The quality control has issues if it's letting all these problems through, but the problems would develop less frequently if Apple built it a bit better. From what I understand, Apple used fairly low grade aluminum and anodizing. I know I've had some devices with black anodized finishes subject to rather extreme excuse with barely any cosmetic damage.
I do wonder if the cost savings offset the number of exchanges they get.
----------
That's like asking why Kia or Hyundai cars are not as good as Honda or Toyota. It's not demanded, that's why.
Apple used to be considered the Mercedes or BMW of computers.