I always suspected it was to push headphone tech further to a long term better experience - it has been a ripe target for the trend of eliminating the pains of wires. This trend has already dominated video games controllers, and is quite present with computers as well. Headphones are a logical target long overdue for improvement - the hassle of wires, and even a physical hazard in some edge cases (I have my own tale) should in an ideal situation be something eliminated.
I think the theory that it was done so Apple could sell more bluetooth headphones is not how the company thinks - headphone accessory sales are a drop in the bucket financially. I think the decision to remove the port was made beforehand, and the company then invested in creating more bluetooth headphones as a response to that decision, not to drive it.
Of course, I could be wrong, but the emotional conclusion that I’ve seen in multiple places doesn’t seem to have a compelling explanation as to why the headphone jack was removed. The company prioritizes UX in general and acts in response to the implications of the UX, not chase money and think of the UX second.