What is the use of governmental sovereign immunity within a state?
This is seen internationally, but I will stick with an example from the US.
In the US, the federal, state, and (some) local governments enjoy sovereign immunity giving them protection from all law suits. And this was a very important principle that after the landmark Supreme Court case Chisholm v. Georgia (1793) which found the individual states not immune from law suit, Congress and the states rushed to get the 11th amendment passed, taking only two years and reversing the previous decision.
However, in a lot of situations, this immunity is waived by statute to allow for people to sue states and the federal government for damages. My question is what is the rationale behind this? Why have immunity except only to waive it? Would a republic or its government be weaker if this immunity didn't exist?