The book you bought at the store does not go towards D&D Beyond's licensing fees paid to WOTC, nor to D&D Beyond itself for the costs that go into the development and maintenance of the site. Just as if you wanted to buy a second copy of the Player's Handbook to share at the table, your earlier purchase does not give you another copy for free.
WOTC =/= D&D Beyond.
Curse Media = D&D Beyond.
If you do not wish to purchase the content from Curse to use on D&D Beyond, you may use their built-in Homebrew system to manually enter the content from the book yourself.
why do we have to buy the books again if we already have the physical copy?
The book you bought at the store does not go towards D&D Beyond's licensing fees paid to WOTC, nor to D&D Beyond itself for the costs that go into the development and maintenance of the site. Just as if you wanted to buy a second copy of the Player's Handbook to share at the table, your earlier purchase does not give you another copy for free.
WOTC =/= D&D Beyond.
Curse Media = D&D Beyond.
If you do not wish to purchase the content from Curse to use on D&D Beyond, you may use their built-in Homebrew system to manually enter the content from the book yourself.
This is a common question.
The short answer is because DDB is not WotC.
For more information, find one of the many other times this question has been answered.