They are not legally entitled to deny you entry.
That doesn't mean they can't deny you entry. It means you might win a court case some day.
ICE cannot legally arrest people who are citizens for no reason, and yet they have done exactly that 30% of the time by their own admission.
"Knowing your rights" is meaningless if the public chooses to vote for people who don't care about those rights, and celebrate when you do not get your rights.
It doesn't matter what the paper says, it matters what CBP feels like doing, and what their management lets them get away with. The constitution is just a magic circle we all agree to play in, and isn't real if enough people disregard it.
If the border agent doesn't want you to come into the country, you are fucked. Nobody's job is to get between that agent and you and ensure the border agent follows the law on the paper, and the border agent will not go to jail or even lose their job for completely ignoring the law.