This is because the expectation of the socialisation of losses changes the behaviour of banks ex ante. Whether taxpayers should in fact bear losses, given a failure, is a different issue. That is determined by the costs of the bail-out and future costs of moral hazard, including the cost to future taxpayers.
These costs to future taxpayers include the dead-weight costs of the additional tax burden to finance future bail-outs. These expected costs must be weighed against the potential costs and losses taxpayers face from the loss of liquidity transformation and credit origination services that may accompany the loss of confidence associated with depositors taking losses.