Indian lenders have been doing this for a long time. They deny loans to borrowers from certain pincodes, provide loans with lower limits or higher interest rates etc.
Happens in Germany too. It is illegal if that's the only criteria, but hard to enforce cause most banks will tell you that they used their "judgement" to decide.