I'm frankly super confused about salaries right now. Currently job hunting in Europe and the other day when a recruiter asked how much I was looking for I gave my current salary as a minimum of 65 euros/h and the recruiter kind of chuckled and told me that if I'm a good match I could ask for like 90. Okay, sounds great. So a few days later I was having an initial interview for a senior ML position and when asked how…
At least here in the USA, there's a lot of advice about deflecting that question. Things like, countering with "What are your pay ranges?", or "Let's wait to negotiate the salary until we're sure we're a good fit." and so on.
I believe the common reasoning that they ask early is to cut out overpriced developers. When a company gets lots of applicants this probably makes sense to them. I think generally, if you're a good fit they'll go a little above their max pay to try and bring you in.