You're writing more code than you have to though. More code = more bugs.
While the total LoC written might be higher, the amount of written logic in which you can introduce bugs is less.
Some languages make this less likely (Haskell, Rust) but most mainstream languages will happily let you introduce this bug.