One of the ideas behind this "Beamter" thing is (in jobs that aren't teaching) that the state can't pay competitive wages for highly educated employees, so they offer somethings else instead which may be as appealing in the long run.
This "tenure" thing is terrible though. They can't be fired for anything short of really gross misdemeanors, such as serious corruption. Not doing the work one is supposed to do is not a gross misdemeanor. There are highly motivated public servants, but the "Beamtenwitz" is not a staple of German humor for nothing.