Assuming we’re talking about a classification task, a model doesn’t just take in an image and say “it belongs to class A”. Instead, it output some number of values (called logits) which essentially is how confident the model is in some image being class A, B, C, and so on.
For example, say that for some image (that belongs to class A), the model outputs the logits 0.5, 0.4, and 0.1. What we want the model to instead output is something like 1.0, 0.0, 0.0. As in, be very confident that the image belongs to class A and be confident that it doesn’t belong to class B or C. If we only take our loss to be 1 - accuracy, this information isn’t conveyed to the model. We want to instead take our loss to be something like cross entropy loss. This is the typical way loss is calculated in classification networks. I would suggest reading more into that loss to get more of an intuition on what’s happening.