Actually Uzzah was angry with the oxen. Uzzah showed a lack of trust in God as though He who brought the ark from the land of the Philistines couldn't take care of it now. Angels who attended the ark struck down Uzzah for his rashness. His heart wasn't right. Because they didn't know any better.
Light creates accountability.
There were several reasons for David's failure to move the ark home. They learned that the ark was death to those who transgressed the laws it contained, but life to those whose hearts were set to obey them. When we begin to care about the things God cares about we become people after His heart. He had palatial Buildings for Himself but just a tent for God. He was not allowed to build a building for the Ark because of His sins.