I've been in situations where, despite telling them what I'm looking for, they've pressed me to disclose my salary. I've always been honest about it, but I can recall one specific instance where I disclosed my salary to a recruiter and told them that I was seeking a particular salary, only to be told, "No one is going to give you that big of an increase." Who said anything about an increase? It's about paying what I'm worth.
I've seen how a hiring company might look at a person who wants $X, but earns lower-paying figure and think, "Well, market pay is $X, but if the company before was paying them $X-20%, we can get away with offering $X-15% or $X-10% because it's a marginal increase for the applicant and we still save money."
evilduck, below: nails it with this[0]:
"companies aren't going to tell your their actual upper bounds for what they'll pay in salary, why should you tell them your actual lower bounds? "
[0] https://news.ycombinator.com/item?id=11678634