There's plenty of reasons for increasing prices, though the top reason is that the product is desirable. The average consumer has access to monthly payment plans to hide the true cost of a device, but they can do that with any product and will look elsewhere if one product isn't desirable. The more well-off consumer can just buy any product they want, so really they, too, are making their decision based on how desirable a product is.
Mind you, a product can be desirable because it brings something new to the table either in the entire industry or simply within a particular manufacturer's lineup; because it is more of what the customer already feels comfortable with; or simply because it works well with what they already have or use. The first type is served by allowing a level of frustration for something new to build up for a couple of years, then releasing something really nice (Touch ID, Face ID, new physical design, etc) - this is usually the case when some customers also feel frustrated with having to "buy new versions of stuff they already own". It's a calculated risk on Apple's part, banking heavily on the desirability of their products. The second type is served by small and steady updates to the software that usually keep things familiar enough from one year to the next (annual iOS updates, refinements to Apple's apps and services). The third type is served by making sure the products are intended to work together and by leveraging what customers already own (iCloud Drive, iCloud Photo Library, iMessage in the iCloud, App Store, products with the Lightning connector, etc).
With both types of customer prices can gradually be pushed higher, although for different reasons, and when that happens they need to be pushed higher across the board so as to maintain a more or less "sane" parity across different device categories. If only iPhones got more expensive, for instance, at some point their value proposition would start feeling weird compared to iPads and Macs. That's one reason why only iPhones can do regular phone calls - it's a big part of their value proposition. That's why the Apple Pencil only works with iPads. They have a niche that's not going to be filled by any other Apple product, so if you want to do those things in the Apple ecosystem you need to get the products to match, even if they cost more this year than they did last. Likewise if iPads did exactly what Macs do and were also iPads, they'd have to cost more than Macs for them to make sense to Apple as a product - and maybe we're slowly getting there.
Apple plays the long game and as such it's in Apple's interest to allow its customers to acclimate to a certain price expectation for any given product type they sell. If one year they sold a sub-1000 dollar iPad with iOS apps and the next year announced a 2000+ dollar iPad -like device that was able to run both iOS and macOS applications the majority of their iPad customers would be shocked. Their expectations of what an iPad can do for them would still be mostly based on what their previous iPad did (plus a few of those incremental improvements or the occasional brand new thing), and the sudden jump in the price they expected to pay for a certain iPad hardware configuration would in no way match with that - what's more, they might not see the added value of support for macOS apps. So it only makes sense for Apple to gradually increase the price of a product if they expect that two, three, five years down the road that product will do more than it does today. For them today's price needs to be a step below the price demanded by tomorrow's features. For their customers the price hike needs to be tied to something new that can be used to explain it today. Hence the iPads Pro and iPhones X.
All of this requires that your product is desirable for the majority of your customerbase. Sure, it's valuable to have superfans that act as ambassadors for a product, but those people are a minority just like people who own a product but still bash it. Apple knows there's always going to be someone who wants something Apple does not provide, or someone whose personal budget will not allow the purchase of a new Apple product this year. But there's always going to be next year, or the product two years from now, that'll make sense to upgrade to because the previous product will continue to serve well in the meanwhile.
That's why new versions of iOS consistently work with years-old devices. To make it possible for you to reach a level of cost-per-day you're comfortable with before spending again on a new product you find desirable and don't feel the need to dismiss due to price. That's the long game.
Note that this is not a criticism of how Apple does business, it's just an observation. I'm in the fortunate position of being patient, not needing to upgrade every year, and being able to upgrade to what I want when I need to. I'm mostly concerned with things I have no control over, like whether I might be susceptible to PWM or not, and if I am, whether Apple will implement it better in future products or not.