Risk management

Why does a lender recognize an allowance or provision for expected credit losses?