It doesn’t. Not sound ahadith.
The Holy Quran has not nor can it ever be tampered with. The Arabic of The Holy Quran today is the exact words revealed over 1400years ago.
But as for ahadith, people can, have & do lie or give mistaking or false information & attribute it to Prophet Muhammad. But those who lie on him knowingly are cursed.
This is why ahadith have to be confirmed to be sound & proven that it came from Prophet Muhammad.
So, if such a case arises where a Hadith contradicts The Holy Quran, then it is not a sound hadith. For Prophet Muhammad was the walking, talking, living Quran. He did everything he was commanded, conveyed everything he was taught by Angel Gabriel. Then he taught it to his followers.
Contradictions is one of the main ways of telling The Truth from falsehood. One of the main ways we know what parts of the 350 versions of the bible are true. Why? Because The Truth doesn’t contradict itself nor does The God or those whom He sent.
So, even though people keep tampering with the Bible till there are 350 versions, and so called new information, like Jesus had a brother, creeps in, the truth, how ever little of it remains, will contradict with the words of men:
(Do they not then consider The Qur’an carefully? Had it been from other than The God, they would surely have found therein much contradictions.) (Quran 4:82)
So The God is letting us know that whatever is not from Him, will contradict. This is why the versions of the Bibles contradict, even contradict within the same version & why the different beliefs surrounding these 350 versions contradict. If more people read for themselves & not blindly take the word of others because they appear more righteous & more learned, they will see the contradictions themselves & see that The God says, He is not a God of confusion (1 Corinthians 14), so, why all the confusion? So you can see how that biblical verse is in agreement with The Holy Quranic verse above (Quran 4:82)
And the only thing that differs are the laws over the centuries in between Prophets because many earned certain hardships do to their constant rebelliousness. But when they believe in The Last of The God’s Prophets & His Last Revelation, it removes those burdens & difficulties off them & they will be forgiven all their past sins.