Optical audio output is used to link Macs to home theater setups and A/V systems capable of multi-channel surround sound, by way of a mini TOSlink adapter connected to the 3.5mm jack.
The removal of optical audio was first noted by AppleInsider, after it was discovered that Apple's technical specifications for the headphone jack no longer mentions support for "audio line out (digital/analog)".
Removal of the standard was confirmed by comparing the System Profiler report on a new 13-inch MacBook Pro, which makes no mention of S/PDIF Optical Digital Audio Output, against reports on 2015 models, which do.
When queried about the removal, Apple said the feature was dropped due to a lack of customers using the functionality, noting that "plenty of USB-C zero-latency professional peripherals are available now, or coming very soon" with optical audio out connectivity.
The phasing out of the standard from the new MacBook Pro models follows a trend that began with the Apple TV. Apple ditched the optical audio port on the fourth generation Apple TV in favor of a USB-C port, preventing users from connecting headphones directly to the device.