"Defect" simply implies that the software fails to do what the customer or business representative wants it to do. This might be due to an actual "bug" (a programming mistake); but more often, it's due to some kind of communication problem between the customer or business representative, and the programming team. For example, if the customer fails to clearly express what they want, or changes their mind after the programmer has started work, then this can lead to a "defect", even though the programmer has not made an error.
In other words, a bug is a specific type of defect, but not the only type.
Occasionally, though, the two terms are used interchangeably. But usually not by programmers.