The P-5 Pyatyorka (SS-N-3 Shaddock) missile required the Project 659 submarines carrying them to stay surfaced after firing to send mid-flight guidance updates.
However, problems with the engines of the P-120 Malakhit forced the Soviets to design a sub-launched missile based on the P-15M Termit (SS-N-2C 'Styx') as a stopgap measure for the first batch of Charlie submarines.
The short range of the P-70 meant it could rely on inertial navigation and radar-homing, and as such did not need mid-course updates from a radar on the submarine.
Consequently, along with the addition of the radar-altimeter (which allowed for a much lower cruise altitude than previous missiles), the novel sub-surface launch capability meant that reaction time for surface targets was minimal.
As a result, the ability to deploy in littoral and close-range combat scenarios without necessitating exposure of the launching submarine more than made up for its lack of range compared to the P-5.