I am not a skilled programmer but to answer the OPs question, coders don't always do this because they are being lazy. Also I think we should be clear that syntax mistyping is very different from a bug in the coding world. These are just my definitions your mileage may vary :
Bug: A programming error that causes an outright failure of code or a failure of code to produce the expected results.
Syntax Errors: Mistyping code so that it does not function or compile.
Again just my 2 cents your mileage may vary
Anyways from my amateur programming perspective I have seen coders trying to hammer through an idea of concept they have and they are typing 100 miles an hour and end up with typos or syntax sloppiness that then takes from minutes to hours to resolve. My experience has been this, work in a powerful IDE. Something that highlights the obvious. The second thing to consider with these "bugs" is the alternative to hammering out great ideas in a hurry which is NOT getting things done. In software development piling bugs upon bugs upon bugs seems like madness but... infact there is a word for this kind of strategy in the development lifecycle and that is call "Agile". Agile is a project style that involves quick execution of small pieces of work and being willing to accept a certain amount of broken. The broken parts are flagged for fixing but potentially by someone more junior or a cheaper $/hr resource that allows the primary coders to stay focussed on the hard bits.
I think I am just rambling now but I wanted to respond to this because it used to drive me nuts until I took some courses in the Agile methodology for project management and realized that if you apply the right methods of handling the bugs and keep delivering slow but steady advances in your project you can cut down the time of delivery for a piece of software by massive amounts.
Anyways my .02$ good luck!