Country of legal residence is the country that an account holder declares as home on a brokerage or bank application, and for an individual it normally matches the person's tax residency, the country where the person is liable to tax on income. For a company or other organization it is usually the country of the main place of business. People posted abroad, such as diplomats and members of the armed forces, generally keep the country they are serving as their legal residence.
Financial firms ask for it because it determines which rules apply to the account. It affects which entity of a group may hold the account, which products can be offered, which investor protections apply and how much withholding tax is taken from dividends and interest. The declaration is checked against identity documents and proof of address as part of customer identification (KYC) procedures, and it feeds the reports that firms make under the Common Reporting Standard.
The term is not identical to tax residency or to legal domicile. A person may live in one country and remain taxable in another, so applications often ask for each separately.