Surprisingly, very few candidates ask us upfront what the position pays. In fact, we've only had one candidate who tried to play the "salary game" (if you will) and turned the question back on us when we asked what their salary range was. Like I said though, we just reveal it. To us, it's not a game, but rather two parties exchanging information in a fair and transparent manner.
At the beginning you are not invested in the candidate. A candidate that wants to work for you, but wants to maximize salary would be foolish not to try to get you to invest more before starting to talk salary, as it's far harder for you to walk away over 5% or 10% or even 20% once you've decided you have a candidate you like and face the prospect of spending time on another candidate instead.
You have the power advantage that passing the candidate over has less impact for you than it has for many/most candidates, so to a candidate it is far more important to spend the effort of selling you on just them first before talking price.
It is true that making sure you are on the same page salary-wise is a good idea, but it doesn't always have to be the interviewee to establish that.
Basically, I have a checklist for the first phone interview, and the relevant item on that checklist is "make sure pay range is agreeable". It doesn't say "get desired pay range from candidate" or "let the candidate know what the pay range is". We have no preference.
Because when you say "if we can come up with an agreement internally (our hiring is very informal)", that to me means that if I get through interviews and you like what you see, I'll be able to work with you to get you to fight for a bigger budget if I expect more than what you had in mind.
It's easy to get people to push their numbers up once they know you and like you and believe they need just your skills, and it's easier to do that if you've not revealed that you'd be willing to settle on their range earlier in the conversation.
My best results in getting good offers have been when I've deferred all exchange of salary information until the very end: Get them to agree that they want me to join, and it's "just" the formality of getting me to agree to a salary. At that point the interview process has gone from me courting them, through a "it looks like we both like each other", to them courting me, and the power balance has shifted substantially because the hiring manager is invested, and everyone has spent lots of time getting to that point.
This doesn't necessarily work as well at low end position where you're just one of many cogs, but it makes a big difference when people are looking to slot in just that one important (to the hiring manager, you might still be inconsequential to the overall business, depending on size) position.
Even here, you ask the candidate for their salary range, instead of just stating what yours is.
If the salary isn't posted, it's a negotiation. There isn't a hiring manager alive that will blow off a potential hire because they ask for 5-10% more than the initial offer. They might not give it to them, but they won't walk away because of the question. Naturally, as a hiring manager, you might very well offer 5-10% less than your maximum in order to either give you bargaining room, or come in under budget for the position.
It's lightly adversarial, sometimes unpleasant, often annoying, but a part of life unfortunately. Some places more than others for sure, but I think it'd be hard to escape it fully.
For my own part, usually I end up negotiating up at least 25%-30%. My "record" is 50% over the initial offer. Usually I also end up asking for more options etc.
The most unpleasant and adversarial negotiations have been ones where I had to give up salary information at the beginning or have the conversations cut short. They're the only negotiations I've entered into where I've sometimes ended up being lowballed, and the only ones that have failed over salary, and in one case led to me telling a recruiter to fuck off and never me call me again over it. As a result, these days I will tell them flat out that if they need my salary details up front, that indicates to me they are unlikely to be able to afford me, and to call back when they have more budget flexibility.
I definitely understand the need to be efficient with everyone's time, but "have the candidate share their desired salary" is only one way to do that.
I have heard this reasoning from recruiters many times, but haven't heard a good explanation as to why they don't just tell the candidate the range they're willing to pay.
(This is a genuine question) Why not just tell the candidate your range if your concern is to respect everyone's time?