The words drachm, dram sound the same but have different meanings and spellings. Why do drachm, dram sound the same even though they are completely different words?
The answer is simple: drachm, dram are homophones of the English language.
A unit of weight in the U.S. Customary System equal to 1/16 of an ounce or 27.34 grains (1.77 grams).
A unit of apothecary weight equal to 1/8 of an ounce or 60 grains (3.89 grams). See Table at measurement.
A small draft: took a dram of brandy.
A small amount; a bit: not a dram of compassion.
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.