What if you had to pay the cost of every bug you created? I'm sure a lot of us developers would be digging ditches instead. :)
Not sure that's the best solution here, but the assumption that "no one would do the work" is likely not correct.
I'm also not sure exactly how bonding would work in jobs where blame is hard to determine, or not attributable to a single individual (ie systemic issue). Perhaps that's one of the reasons it's not done more commonly.
In my state, NJ, anyone can bring a disorderly person in front of a judge or detain someone who's suspected to have committed a major crime. However, it never happens because if we were incorrect then all sorts of civil and criminal claims could be made for injuries and/or false imprisonment.
We scoured the state's criminal law and found out members of law enforcement were relieved from liability if they were wrong about the above.
The other job that was exempt from liability was librarian. Apparently, a librarian can tackle someone suspected of stealing a book and it's ok under NJ law. [1]
[1] https://law.justia.com/codes/new-jersey/2013/title-2c/sectio...