Because each one of those has 3 (Samsung) or 4 (iPhone) major models with wildly different specs, and each of those specs has often times major differences in quality between the two lines.
[https://www.pcmag.com/news/samsung-galaxy-s23-vs-apple-iphon...]
Samsungs adware and weird modifications being a major negative IMO too. Though that's a taste thing I guess.
https://www.apple.com/shop/buy-iphone/iphone-14
https://www.samsung.com/us/smartphones/galaxy-s23/buy/galaxy...