The "therefore" at the beginning of verse 7 makes a natural link with what our writer has just stated in verse 6 - "...but Christ is faithful over God's house as a son. And we are his house if indeed we hold fast our confidence and our boasting in our hope." Our writer is going to change examples in today's text to suit his new purpose of warning. He is launching a new train of thought by switching from the great examples of faithfulness in Moses and Jesus to the dangerous example of stubborn unbelief in Israel in the wilderness.
This warning was just introduced in that conditional clause in Hebrews 3:6 - "...but Christ is faithful over God's house as a son. And we are his house if indeed we hold fast our confidence and our boasting in our hope." Now our writer is going to develop this point of warning. The same "if" idea is repeated in the opening verse of today's text, Hebrews 3:7 - "Therefore,as the Holy Spirit says, 'Today, if you hear his voice...."
By now we shouldn't be surprised at our writer's plan for making his point. As he writes this letter to Jewish believers he begins unpacking his argument with a lengthy quote from the writings of revered King David in Psalm 95. Our writer quotes this Psalm at some length in verses 7 through 11 of Hebrews 3.