An employer will have a compensation range in place before hiring. Before even thinking about it (Projects rather are x-ed or delayed into next year than exceeding that range).
Its tempting to have by chance some applicants demanding even less. Lowered pay expectations out of lack of knowledge are a main driver for non-disclosure.
Therefore it may be helpful to realize a moral compass among developers: not just don't apply there, but make it publicly shameful to even try to lure other developers into it.
But: Hiring is time consuming. And a process which you want to pass smoothly. And even more important: finishing it. Upfront transparency takes away the upper hand you may need when things get out of hand. Like when choice#1 applicant lied about how he'd love to work at your company and walks off in the middle of your process.
If an employer names a range, all applicants would be demoralized if they don't reach its upper end. Probably expecting to reach that pay-grade sooner or later, somewhere else if need be.
Also applicants are different in skill level and almost always applicants will either exceed or undershoot in certain job qualifications. Qualifications that are prioritized. Your applicants are mixed bags, your job offering is. Having the ability to ponder while not aggravating them makes intransparency reasonable.
As a compromise: Why just not make the lower end of that range public?