So you've successfully passed your technical job interview and now you're talking with the HR of the company (or maybe the CEO himself). All of a sudden this nice girl asks how much did they pay you at your last job.
I personally find this question inappropriate and rude. When I answer it honestly I always feel like they want me to justify myself. At the same time I suspect that my employer is afraid to pay me more than the bare minimum.
Here's an image to illustrate the point. The HR knows the salaries of all the people in the team you're applying:
Her job is to minimize the costs for the company while minimally satisfying you with the number.
You, on the other hand, have different set of numbers in mind, like your dream salary, the "median salary in the industry" you've read on some website, the minimal salary you're willing to work for.
In that moment you feel that this question is even worse than the question about your weak sides. If you think logically, there's not so many options for you to answer it.