2Sa 6:6 And when they came to Nachon's threshing floor, Uzzah put out his hand to the ark of God and took hold of it, for the oxen stumbled.
7 Then the anger of the LORD was aroused against Uzzah, and God struck him there for his error; and he died there by the ark of God.
8 And David became angry because of the LORD'S outbreak against Uzzah; and he called the name of the place Perez Uzzah to this day.
The Lord was not being too harsh on Uzzah. His reaction was expressive of his heart attitude towards the ark of God. Judging by his action, one might say that it was too severe on God's part. But God sees the hearts of man. Apparently, Uzzah did not have that much reverence towards the ark of God. Behind Uzzah's touch was an irreverent heart.
We get a hint of this in the next verse: 2 Sa 6:9 And David was afraid of the LORD that day; and he said, "How can the ark of the LORD come to me?"
You see, apparently, even David himself did not have that much reverence towards the Lord at this point in time. It was only in this day that he feared the Lord this way with regards the ark. The difference was that David did not touch the ark while Uzzah did.