The words overdo, overdue sound the same but have different meanings and spellings. Why do overdo, overdue sound the same even though they are completely different words?
The answer is simple: overdo, overdue are homophones of the English language.
To do, use, or stress to excess; carry (something) too far: overdid the diet and became malnourished.
To exaggerate: overdid the compliments.
To wear out the strength of; overtax.
To cook (food) too long.
Being unpaid when due: an overdue bill.
Coming or arriving after the scheduled or expected time: an overdue train.
Expected or required but not yet having come about.
Being something that should have occurred earlier. See Synonyms at tardy.
Definitions from The American Heritage® Dictionary of the English Language, 4th Edition and Wordnik.
Homophones (literally "same sound") are usually defined as words that share the same pronunciation, regardless of how they are spelled.