Shouldn't Apple replace a defective phone?

Episode 1692 (1:18:40)

Hall from Chattanooga, TN
iPhone 11 Pro Max

Hall bought an iPhone that cost him $1400. The sound is terrible. So he sent it back and Apple says the problem isn't in hardware, it's software and as such, the phone warranty doesn't apply. Leo says that the phone is a lemon and Apple needs to make it right. Even if it was software, who makes the software? APPLE DOES! So if the phone doesn't work, it needs to be replaced.