Prior to computer-created sound files or digital sound, sound was recorded via analog. That means engineers used electronic or mechanical means to capture and transfer sound. These are called analog technology.
For example, a tape player is analog. It plays back sound through mechanical means.
Meanwhile, your computer plays digital sound. This is encoded data that the computer reads and translates into sound.
Almost all the consumer wired headphones are analog technology. However, our phones and the music we play is digital. That means phones need DACs installed in the phone. These are digital to analog converters. Compared to other cell phone parts, they are typically much larger and there’s a physical limitation to how small they can make them. Also DACs can have a significant effect on sound quality.
The way to get significant space to make the phone smaller, and possibly conserve battery life would be to eliminate the DAC and headphone jack altogether.
In addition, more phones are competing for Water resistant certifications. And the headphone jack presents a challenge because it needs to be able to conduct electricity yet, resist water damage.
Lastly, less analog parts and less ports means less maintenance issues. One more port and the DAC means one more chance for something to put the phone out of commission.
The downside though, is that digital headphones aren’t prevelant and not nearly as cheap. Obviously, having sound go through same port as charging is not ideal. There isn’t a standard that all manufacturers can agree on for digital headphones. This leaves Apple to charge a premium price for proprietary technology.
Apple has a rich tradition of not clinging to tradition. If they see something that represents holding back future change, they don’t mind dropping it. They also aren’t nearly as afraid to require customers to buy proprietary technology because they have a business model that supports this dynamic with their customer. Plus their market segment does not include customers looking for the best bargain. That gives Apple alot of flexibility.