So, no, like life itself, we all make mistakes in our systems. The important thing is that we don't make the same ones over and over again. In software development, that means adjusting our development methology to make such bugs less likely in the future. That is why software development is both the most challenging and most rewarding of careers. Of course, I may be a bit biased ;-)
As far as encountering crappy managers, I'll just say that I can count the good managers I've had on one hand and still have a couple of fingers left over. As to your former manager's particular flavor of belligerence, I haven't had that one specifically, but there are very much uglier variants, my friend. My understanding is that one cannot be made a manager unless the person is willing to prioritize money over human beings and it doesn't take a biblical scholar to see how that is causing so many problems in the small and large across the world. In the small, that attitude manifests itself in many ugly personality traits, while being the foundation of the entire structure and intention of the for-profit corporation where the vast majority of us are forced to find our work.
The same thing goes for the industry - I think that it's accurate to describe modern software engineering as "sloppy", in general, especially if you compare it to the standards in engineering proper. But we're there because this is what the market is willing to pay for. Much like all the people complaining about all the cheap Chinese junk in stores, but not willing to pay significantly more for quality.
My (now former) boss was non-technical. Wondering if anyone else has encountered such a person? Coming from other industries, is it common that people view software engineers as somehow sloppy or lazy in their work? Is it really true? Is it unreasonable to expect a competent engineer produce working, correct & bugfree performant code on the first try? I’ve definitely had my moments of brilliance where it all “just worked” but that usually isn’t the case and I’m wondering if it could be something wrong with me?