The APAS docking system was first used on the Apollo Soyuz Test Project mission. Both parties (US and USSR) already had developed and used docking mechanisms by then. Is there any truth to the claim (see the comments in that question) that the US and USSR were unwilling to share details of their existing systems with each other, so they had to develop something new instead?
Prior to ASTP, both Apollo and Soyuz spacecraft used a probe-and-drogue docking system, which requires different hardware at each end of the docking interface. This means that if you want two spacecraft to dock with the same space station, for example, the spacecraft can't dock with each other.
In order to support ship-to-ship docking, therefore, an all-new androgynous docking interface was required.