Why did God kill Uzzah?


For trying to keep the ark from falling (by touching it)

And when they came to Nachon's threshingfloor , Uzzah put forth his hand to the ark of God, and took hold of it; for the oxen shook it.

And the anger of the LORD was kindled against Uzzah; and God smote him there for his error; and there he died by the ark of God. 2 Samuel 6:6-7