As Kilisi said, there is no legal problem in the absence of an agreement, but a minor chance of some blowback.
However, I don't view it as weak if your friend complies with the request. I think it's completely reasonable for a hiring company to not be able to take your friend's word on face value, as the company barely knows them. If your friend can provide some documentation that allows some certainty about what they are saying, that makes sense to me.
From my perspective, the truth of the situation is the real bargaining power here. There is no need for smoke and mirrors to try to develop some sort of power move by not acquiescing and trying to obfuscate matters. It logically doesn't make sense to me.
I mean, they may believe your friend anyway, in which case they may match, or they may not believe your friend, in which case they won't match. So there is no upside, and only potential downside. What could possibly be the upside here?
My take is, company Y doesn't have to offer to salary match, but they are offering it conditionally. Your friend is not forced to take them up on the offer.
Some people consider the idea of salary matching itself to be unethical. I don't think that's inherently true.
If your friend is fabricating offers that don't exist, which some people do, that is certainly unethical.
If your friend is using offers that they have absolutely no intention of accepting, that is unethical.
If your friend is being truthful, and without a salary improvement the company will likely not be chosen, that it is perfectly acceptable to let the other company know (especially if they've asked). They can elect to match or not match based on that.
So yes, some negotiating tactics are questionable. But if all parties are being truthful, I don't see a grey area here.