It's incredible how mileages vary. I recently had to strike companies off my list which demanded to know my last salary.
I offered them my salary expectations, but they would absolutely not accept that, and preferred to take the fact that I would not tell them the exact salary at my last position as a reason to decline to immediately stop the interview (with half an hour left in the call).
This wasn't a one-off either, I would say about 5% of companies (biased sample) try and get away with shit like this.
(This was German-speaking Europe)