I have seen this happening systematically and repeatedly. Note that your mileage/kms may vary within the precise European country you are talking about, the working sector, and the fact that the company is either public or private.
I get the distinct feeling they're trying to lowball me (and everyone else)
You. Are. Correct. In a number of EU countries (your mileage/kms may vary), your salary during a job change is dictated by a percentage increase of your previous salary (5 to 15%), rather than market rates. I won't add words about the gender gap, because that would make me madder than I am now when I write such stuff 😠
More in general, companies will ask you for your current salary very early. This has an upside from a certain point of view, because if you already earn too much for their budget, they will end the selection process straight away. Every company has the right to put in a budget constraint before starting selection, so checking the budget is less waste of time for both parties.
The downside is that if you didn't get raises often or didn't change job for a long while, you are capped to a salary lower than your fellow desk mate who has your same seniority, but changes slightly more jobs than you (note 1).
Personal experience: I have tried to dodge such a question in the past. This excerpt is from a very early stage in conversation a few years ago.
I: "First, I would like to know what is your current package"
Me: "Mam, are you already asking me for salary package? I don't normally disclose that to unknown companies. Perhaps you would like to discuss about my skills"
I: "No, we need this information to check whether you are ok with the role we need"
Me: "So, you want to know about my previous project?"
I: "Please, tell me about your compensation package first"
Normally, such companies will deem your payroll mandatory for their selection process. I have tried repeatedly to dodge the matter, but as you could see, they will force you to disclose that. When I was close to the end of the selection process, I was always asked for the last 3 or 4 payrolls, probably to check that I never lied on the figures I (had to) tell. They were asked before a written offer was made or a final figure told me. When I refused/dodged the request, my selection process ended in silence.
Unfortunately, this is labour and social culture.
Does anyone know if there is a European law against this?
Unfortunately, your laws are almost against you. GDPR, for example, protects the privacy of individuals by means on information and consent, not by means of obligations.
First known example: Facebook never had to change their way to track users after GDPR. They simply changed their policy to say "you agree that we track you by means of this and that", using friendly language.
Do you want an extreme example? Here it is: your potential employer for a simple office role could theoretically ask you for an STD (note 2) medical test without blatantly violating the GDPR. They are just obligated to ask for your consent and inform you about that. Should you deny consent, they are private companies. They hire whomever they want. What they can't do is ask for a blood sample to conduct their own testing without information. I never heard in EU about such practice anyway!
Laws are with you in the public sector, e.g. government roles. In these cases, hiring procedures are extremely constrained and salaries are known long before the selection process takes place. Corruption is not part of my equation to avoid getting things complicated.
In a few words
The only way to change country culture is by the grounds and the laws. As a single individual, you will never be able to change the establishment alone. If everyone here started refusing to send payrolls to potential employers as a form of self-blackmail, employers will have to change in order to hire someone.
But eventually, someone in real need for work will accept such conditions and send the payroll. And then another one... And another one later...
- Note 1: changing job too frequently is a red flag, and you are flagged a gold scavenger
- Note 2: just for those who are unfamiliar with acronyms, remind that STDs stands for sexually transmitted diseases. Ok, you can now get offended.