It could simultaneously be true that including a good salary range increases the number of applicants who are good fits for the role, and
also true that including a good salary range decreases the average quality of candidates.
One way you might see that effect is if both candidates who are good fits for the role and candidates who are bad fits for the role apply more often when a high salary is posted, but the number of bad fits increases faster than the number of good fits (e.g. because there is some subset of people who will send their application to every role that pays over a certain threshold whether or not they are qualified).
If it's sufficiently costly to distinguish qualified from unqualified candidates, the company might be better off not showing a salary range, even accounting for how it causes good people not to apply. That approach does feel like an inelegant hack to get around their inability to easily tell whether someone would actually perform well in the role though, so addressing that root cause would be better in that scenario if they could figure out how to do it.