Why does it have to be one or the other? The beauty of what Apple does in the consumer market is that their hardware and software are so closely integrated.
It doesn’t have to be. I find it helpful to think of Apple as a hardware company when I want to understand their strengths, what motivates them, and how they compare to other tech companies. But of course the great hardware isn’t anything without iOS and other integrated software like Messages. It’s a combination.