This is just a theory, but I think a fair bit changed with this as their custom A series chips improved. It was easier to support devices further back because they started to have such a commanding lead in performance, which gives some extra room to keep improving the OS without it slowing down like it used to do.
It's not likely to be a pure "performance" thing. The 6S, according to wikipedia [1], is the oldest phone containing an A9 chip, which has an image processing unit, a coprocessor that can handle Siri voice commands, and an NVMe storage controller. It is also the minimum requirement for ARKit.
I doubt very much that Apple is being arbitrary in their support cutoff for phones. If it's capable of the features they build into the OS, it gets support. If I had to make a guess, the next cutoff point (iOS 15?) is going to be a chip having the Bionic Neural Engine, which would make the iPhone 8 the oldest supported phone.
I mean that's fair, but I think in general, the advancements they've made to the A series chips over the years has been them a lot easier to continue to support for longer periods of time.
Hopefully we'll see Mac's with longer lifecycles and macOS support as well. I think the Mac side is a tad short at the moment.