The words berry, bury sound the same but have different meanings and spellings. Why do berry, bury sound the same even though they are completely different words?
The answer is simple: berry, bury are homophones of the English language.
To bear or produce berries.
Botany An indehiscent fruit derived from a single ovary and having the whole wall fleshy, such as the grape or tomato.
A small, juicy, fleshy fruit, such as a blackberry or raspberry, regardless of its botanical structure.
Any of various seeds or kernels, as of dried wheat.
To place in the ground: bury a bone.
To place (a corpse) in a grave, a tomb, or the sea; inter.
To dispose of (a corpse) ritualistically by means other than interment or cremation.
To conceal by or as if by covering over with earth; hide: buried her face in the pillow; buried the secret deep within himself.
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.
If they are spelled the same then they are also homographs (and homonyms); if they are spelled differently then they are also heterographs (literally "different writing").