It very much is to protect vulnerable customers, but it’s not wholly altruistic. UK Banks are (mostly) required to make customers whole if they’ve been defrauded unless they’ve been grossly negligent. The banks have tried to interpret the “gross” part fairly broadly but the regulator and Financial Ombudsman (legally mandated arbitration for consumers where that’s actually a good thing) interpret “gross” as more extreme than “almost anything”. The result of which is that banks are keen to show that they took every possible step to prevent someone being scammed - whether popping up notices during online payments, or asking in person. If they don’t, they can very easily be required to reimburse the customer themselves.
Edit: digging up a citation suggests that it might be a voluntary code that banks are signed up to [1], but the regulatory regime has still swung much more in favor of the customer.
[1] https://www.citizensadvice.org.uk/debt-and-money/banking/ban...