I recall that these numbers were changed and made confidential in the late 1960s during the Vietnam anti-war protest era. At that time, there was a lot of concern about security of domestic infrastructure.
For example, manhole covers were changed to castings reading "sewer" rather than "telephone" in some areas.
ANI response systems were thought to pose a risk because they could be used to identify specific telephone lines in unsecured terminal boxes and wiring closets. This could be useful to someone wanting to tap into a particular phone line.
Or, at least, so I was told by a New England Telephone repair person.