Multiple factors I can think of, I'm sure there's more
* Competing brands with better hardware quality (Pixel's camera vs iPhone) * Competing brands with less opinionated design choices (headphone jacks, expandable storage, et all) * Highly specialized supply chains prevent flexibility in part choices/manufacturers (ex: designing custom screws for iMac chassis, rather than using off-the-shelf parts) * Unnecessary complexity in designs (The HDMI/lightning adapter is actually a computer that essentially runs a program in RAM) * Trade wars cooling relationships with everything from shippers * Walled garden of iMessage preventing soft user migration