Bank bailouts in 2008 were not made to bail out 'the shareholders'. They were made to bail out the sunken assets inside the banks so that those banks could continue operating, including still 'having' the depositors' deposits. Because if the bailout was not made, all of those deposits would go away due to there not being assets enough to cover the deposits.
That's what a bailout is. And this is precisely that.