It is perfectly legal. No lender is forced to make loans--they are not obligated to provide loans, but rather do so voluntarily. Since it is voluntary for them to make loans, they can ask for any information they want before loaning. Conversely, you are not forced to get a loan from them--if you don't like their requirements, you can walk away and go elsewhere for a loan.