This was a classic bank run. A combination of the concentration of depositors from a single industry, massive swings in the monetary flow of that industry, poor investment decision making, and having regulations loosened on it meant that SVB saw far too many short term depositors call for their money and had too much of that money tied up in long term investments.
The government has the liquidity and the reputation that is needed to prevent this from becoming a problem.
The cost that is being borne by the taxpayers is the cost of people depositing money in smaller industry focused banks, which have greater risk, and lower efficiency. If you really wanted to eliminate the cost, the solution would be to have everyone deposit their money in a handful of Too big to fail banks, which would almost certainly be cheaper and more efficient, but is also a bad economic system because of the political power those entities gain.