You can check the credit card application agreement. The bank has the right to disclose customer information to third parties. The business of entrusting other companies to collect debts as an agent is legal as long as it is not done through illegal means.
Just as a bank will entrust an agency to report the crime of credit card fraud to the criminal police team for arrest, this can only be proved by the People's Court's legal judgment.