A classifier's last layer produces raw scores called logits, which can be any numbers. Softmax exponentiates them so they're positive and divides by the total so they add to 1. Then the cross-entropy loss asks how much probability landed on the right answer, and its gradient is beautifully simple: the predicted probabilities minus the truth.