Aren't the bugs typically associated with the software and not necessarily the hardware?We're talking Apple here, Apple usually doesn't put our junk. All major high end companies like Apple or Samsung...etc.... will have glitches from time to time. Samsung had a major one with the Note 7 but they rebounded quite well.
Don't buy a flagship phone when it comes out, let the manufacturer work the bugs out. Else don't complain.