The words precedence, precedents sound the same but have different meanings and spellings. Why do precedence, precedents sound the same even though they are completely different words?
The answer is simple: precedence, precedents are homophones of the English language.
The fact, state, or right of preceding; priority: Applications arriving first will receive precedence.
Priority claimed or received because of preeminence or superiority: The company asserted its precedence as the leading manufacturer of microchips.
A ceremonial order of rank or preference, especially as observed on formal occasions: Recipients of military honors were called in order of precedence—highest ranking officers first.
Plural form of precedent.
Definitions from The American Heritage® Dictionary of the English Language, 4th Edition, from Wiktionary, Creative Commons Attribution/Share-Alike License and Wordnik.
Homophones (literally "same sound") are usually defined as words that share the same pronunciation, regardless of how they are spelled.