The words bi, buy, by, bye sound the same but have different meanings and spellings. Why do bi, buy, by, bye sound the same even though they are completely different words?
The answer is simple: bi, buy, by, bye are homophones of the English language.
A bisexual person.
To acquire in exchange for money or its equivalent; purchase. See Regional Note at boughten.
To be capable of purchasing: "Certainly there are lots of things in life that money won't buy” ( Ogden Nash).
To acquire by sacrifice, exchange, or trade: wanted to buy love with gifts.
To bribe: tried to buy a judge.
Close to; next to: the window by the door.
With the use or help of; through: We came by the back road.
Up to and beyond; past: We drove by the house.
At or to: stopped by the bakery; came by the house.
Used to express farewell.
A secondary matter; a side issue.
Sports The position of one who draws no opponent for a round in a tournament and so advances to the next round.
bye By the way; incidentally.
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").