The idea that you could capture a satellite and return it was part of the mission requirements for the original shuttle design. If it was a 'friendly' or 'unfriendly' satellite was left unspecified.
It was also limited by the Shuttle's OMS in terms of delta-v so the orbits from which a satellite could be retrieved was constrained.