Truth is, when most of us hear about Emergency Liquidity Assistance (ELA), our minds go back to March 2013 when the Cyprus haircut was first announced; we think of ELA as a trouble indicator, one which signifies that a bank is desperate enough to obtain it from the Central Bank, and subsequently, that the bank which obtains it is about to collapse. Yet, even though some parts of this story are correct, both the conclusions usually reached as well as the consequences we think ELA funding has, are, most of the times, unreasonable.
First things first: banks operate with deposits and loans, with the available money in the economy. In addition, they also tend to create money themselves, by the power of credit. What basically happens is that banks, using liquidity (i.e. available money) from their deposits, loan out funds to people. This occurs until the regulatory capital requirement hits. What liquidity means though, is that banks cannot perform their day to day business without money. Imagine going to a bank only to find out that it has run out of money, just like what happened in the US during the Great Depression or in the UK during the 2008 crisis. In order to avoid panic, the Central Bank usually steps in when there is a large outflow of deposits providing liquidity to its banks.
Here's what should be noted though: running out of liquidity is nothing unusual for banks. That's why interbank loans and discount windows exist. In the first case, the bank obtains a short-term loan from another bank with more liquidity available in order to maintain a minimum until more money are returned (via deposits or through loan installments) while in the second case, the same occurs but the bank borrows from the Central Bank. In both cases, borrowing from either source actually has less cost for most banks, especially in the periphery (in countries like Germany and the UK, the interbank lending rate is usually very close to the deposits rate).
Thus, what liquidity needs mean is that there is a positive shortfall in the assets minus liabilities, and the bank has to cover it; whether this cover-up comes in the form of deposits or interbank/Discount window loans is irrelevant to the bank. Banks however, deal with other banks the way they deal with other customers: if they do not believe that they will repay, then they will not lend. Hence, when banks are not very stable (and this might just be a perception not reality), other banks might refuse to lend them forcing them to turn to the ECB discount window (the same might occur if a bank just thinks that it might need a large amount of funds, regardless of its state). The only issue here is that banks have to provide some collateral in order to receive the loan. This collateral is usually in the form of government bonds; when the bond has been rated as garbage, the bank cannot offer it for collateral.
At that time, the ELA comes in play: the National Central Bank (NCB), which usually operates in a strange dependent/independent relationship with the ECB, offers lending and accepts other forms of collateral (e.g. loans). The reason behind this lending is simply that the National Central Bank does not wish for the specific bank to bankrupt, as the costs will be much higher than the benefits (note: the decision of whether to offer ELA or not is 100% up to the NCB. Still, Central Banks do not enjoy making the decision of whether a bank will bankrupt or not so they just offer the funds. Nevertheless, this is not a bad policy in general). While this is a burden for the bank, it actually is much better than the alternative, i.e. deposits. Given the perception (either wrong or right) that the bank is in trouble, it will have to offer huge deposit rates to attract customers; in Greece and Cyprus rates often exceeded 4 or 5%. In contrast, the ELA is offered at Euribor plus 1-1.5%, a total of less than 2%.
We consider ELA to be troublesome because it is a loan, and because liquidity is something we usually do not understand. How can ELA lending be decreased? Simply by bonds moving from garbage to investment grade categories allowing banking institutions to access the ECB discount window (which is just cheaper, otherwise it is just as lending as the ELA), by regaining the market's trust and have more people trust their money to the bank or simply by increasing the money in the market thus increasing liquidity. The latter can only take place through increased bank lending, something which needs both willing lenders and willing borrowers.
If anything, ELA just signifies trust in the bank: if we believe that the bank is going to make it, then it will be able to repay ELA money with no trouble at all. If we do not and the bank does not receive any deposits or more so money are withdrawn, then the bank will not be able to repay. The same holds from the Central Bank side which is really out of options: it cannot really withheld ELA and allow the bank to fail (see Lehman Brother and the steps taken by the Fed afterwards).
Deposits and ELA are materially the same thing for the bank. It's trust which distinguishes between the two; market's on one hand and the Central Bank's on the other. If the latter is regained then the bank survives; if not then it fails. In any case, ELA has nothing to do on whether the bank is viable or not in the future.