How can I fix mislabeled speakers in a transcript?

Why are speakers sometimes mislabeled in transcripts, and how can speaker identification errors be corrected?