It's not illegal - for short.
Generally, collections facilities employ this tactic to find people they do not have direct numbers for. A savvy collector can find a way of couching the issue where they get your information (or passing their information to you) from a third party without exposing a financial folly. Some collections facilities even have disclosure agreements they must follow - they can not disclose the owing of a debt to a third party (unless that party is associated with the borrower in some way). Even then, the person must go through some kind of verification process.
The problem on the collector's end is that the collector must get that person to get you to call back. Doing that delicately is very difficult. People pry, have questions, and want nothing to do with a stranger on the phone unless there is some specific need.
I don't know if I would call it morally wrong (as morals are tied to religious doctrine and I fail to see the correlation). It can feel invasive and embarrassing though.