This is obviously bad for both legal and moral reasons. Legally you may be (unintentionally) violating anti-discrimination laws. Morally you may be setting up a system that arbitrarily denies people who are otherwise deserving with little to no recourse.
It does not matter who personally made that decisi9n, the bank is operating this code and paid someone to write it.
With 'AI' there is no way to know.
Let's imagine my bank is sexist, the code literally says "if WOMAN, Reject'
You can sue my bank for discrimination, and in process of discovery you can request information and documents from the bank, including the code / formulas.
If you have a solid argument, let's say my bank never approved a mortgage for a woman, the judge will grant your request. You, or someone appointed on your behalf, will look at the code / excel formula, see that it's discriminatory by design, and you can request massive punitive fines, because this demonstrates contempt for the law.
Now let's say I instruct my developers to create a neural network that is as convoluted as possible but is unlikely to approves mortgage for a woman. That can be easily done. There will be no proof that we ever did this on purpose, and even proving that it is discriminatory will be challenging. At best, my bank will get a slap on the wrist.
That is why they are banning AI from some areas of life.
That isn’t how it would work in reality.
It would be up to the bank to prove that their practices are non discriminatory if there will be a discrepancy between the number of applications issued.
The plaintiffs will be able to sue and win based on the outcome alone.
As far as actual rights go then you have the right to appeal any automated decision and have a human review it without any bias. Which again it doesn’t matter if it’s AI or a an algorithm based on flipping a coin.
No bank EU or not has people manually approving loans.