They can't, but they can, for example, ask for a fee to read the article. They don't deny you reading it, but they don't have to give it to you for free either.
Either you share your data, so they can make money to operate the site, or you don't, but then the content is not free.
I expect some sites will choose this route.