With the release of the AI-S lenses however, there were some subtle changes external to the lens: the primary reason for AI-S was to use enable cameras to use program or shutter priority modes - this was important for the upcoming release of cameras with this function at the time and the AI-S lenses were designed to facilitate this. With this said, the lenses that had a AI and then an AI-S counterpart were typically optically identical.

But why does this matter to be able to distinguish between an AI vs AI-S lens, if the optical formulas were the same?