To Protect against banks going bankrupt. Governments offer guarantees for investors savings. This is because if people felt banks could go bankrupt and they lose their savings then there would be a rush to withdraw money and there could be a collaspe in confidence in the banking sector.
In the UK, the government increased the guaranteed savings from £35,000 to £50,000. However during credit crisis of 2008, countries like Ireland and Germany gave unlimited protection to savers.
The problem with protecting all bank deposits is that it can make the government liable for a lot of savings. Also it is feared that guaranteeing savings may encourage risky behaviour by banks.