A lender is allowed to consider immigration and residency information, and other information that could affect the lender's ability under the law to make sure the loan is repaid. They can also take into account laws, regulations, and executive orders that limit how companies do business with citizens of certain countries. But they cannot use immigration status to justify discriminating against you based on your national origin, race, or other protected characteristics.
Under federal law, financial institutions generally have to collect information about you when opening a new account. The information can include your name, date of birth, address, and taxpayer or other identification number. The information may be collected from you or from a third-party source.