David was trying to do the right thing the wrong way.
God gave specific directions on how the ark was to be moved, Exodus 25:14, 37:5; Deuteronomy 10:8. David did not remotely follow those directions. His disregard of the Lord’s specific instructions resulted in the death of Uzzah. Uzzah's death was a direct result of a failure of David’s leadership.
Doing the right thing the wrong way, taking short cuts when God has directed another path, does not have a good result. God wants each of us to have a personal relationship with Him through His Word and prayer. If we try to shortcut that by only allowing others to tell us what they get out of the Word, attempting to live on their time with the Lord, we will not have a good result. The how is as important as the what.