Luttridge.
In Spain it is the law (seems maybe ignored by some banks) that non-resident account holders must produce a certificate of non-residence, issued by the Policia Nacional, every two years.
Most banks will, for a fee, obtain it for customers.
It is also a law which has just recently come into effect, that all banks must have a digital record of the ID of all customers (a scanned in copy of their currentt Passport) and some additional info. (including who owns the money in the account, where it come from, private addresses and tax ref numbers in country of residence, etc). What is required seems to vary with each bank.
I have a joint account with my wife and son, who is named on that account; he in non-resident. He had to be named as some utilities would not take payment for his standing orders unless he, as the person contracted, was named..
We all had to complete the forms and provided digital copies of passports.
There was a hiccup, in that the bank had not recorded the form sent in by my son, and they froze the account. I discovered it within a day and had it unblocked.
So don’t blame your bank.
In both cases, on non-compliance the bank must freeze the account.