It is ultimately the developer's choice of which older device to support, based on their time, effort, and the current adoption percentage of those devices.
This actually boils down to one or all of the below reasons:
The API (Application Programming Interface) that is used for developing apps.
As Operating Systems evolve, the platform developers (Apple for iOS,
Google for Android) drop support for older devices, like iPhone 4S
and such. This is because the device(s) reach their designated
software support period set by the platform developers or simply because they might not be powerful enough to handle new APIs.
As newer APIs are added, the newer devices will be able to use them in the app code. So when the developer decides to make use of the brand new API, older devices cannot use them, and API usages based on OS version needs to be added to the app code which is more effort, more error-prone, more testing involved than just developing for the latest and the previous 1 or 2 OS versions.
- But this totally depends on the developer whether to support them or not. For example, WhatsApp just recently announced dropping support for
iOS 8.0, and Twitter dropped support for
iOS 10.0 - you could see the difference between these two apps. So it depends upon the app owner.
The developer, for some reason doesn't want to support older (i)Phones.
It could be his/her/organisation's choice, may be due to the amount of work that is involved in adding support for older phones where the number of users will be way too less. The adoption percentage of iOS 12 and iOS 13 combined is 91% (as of October 2019), so adding support for very older phones running iOS 9.0 and below which people might not be using at all seems like an effort not worth putting.
Most developers follow the unwritten rule of supporting the last 2 iOS versions and the current one for their apps. That will just make their lives a bit easier.
Now the calculator app that you were talking about might have been updated to use latest UI APIs (this could be one of the reasons). For example,
UIStackView is only usable from iOS 9.0. For the end user, the UI will look identical, but the underlying tech used could have changed that won't run on old devices, so that's that.