I think for many people “Bug” can imply something that crawled in from outside and messed up the system, “defect” implies that there was an avoidable deficiency in the specification or the implementation. The engineering mindset might prefer “defect” since it implies that we can fix the process and improve the quality of future products, whereas “bug” implies these things are just a fact of life and you can’t expect to eliminate them
I’ve started using “defect” instead of bug for these reasons. The “bug” euphemism implies the software was once correct, but then problems crawled in from somewhere external to infest the otherwise good software.
That’s really not how 99% of software problems happen. They are defects because the software was defective from the moment it was conceptualized or typed in.
“Bug” tries to soften/downplay the developer’s role in producing a defective program.
A bug is a computer program behaving unexpectedly. It can be caused by a defect. It can be caused by a bug crawling into the wiring and making the hardware malfunction. It can be caused by a cosmic ray flipping a bit.
A defect in a computer program is a place where the computer program that does not instruct the hardware to perform in a way so as to do what the program is intended to do.
Given the current (poor) state of our software, most bugs are defects, but not all. Sometimes it really is a bug shorting out a path on the motherboard causing the computer to not do what it was told to do.
Whether or not most defects are bugs is very case specific. Sometimes they're bugs. Sometimes they're just features that haven't been implemented yet, causing the computer program to not do what it is intended to do in an expected, rather than an unexpected, fashion.
A “bug” is specific to computer systems. It traces back to a literal bug (moth) trapped in a relay and is an external factor with no responsibility attributed.
A “defect” is a declaration that something is evidently faulty with a clear onus on the vendor to fix.