Oh! this when David decided to move the Ark.
It originally been settled in the Tabernacle at Shiloh and was sometimes taken out in battle. But once, they tried to take it apart from God's guidance and lost the Ark to the Philistines.
When the Philistines learned that they couldn't handle having the GLory of the Lord in their midst, they returned it to Beth-semite and eventually to the priests at Kirjath-jearim, or Baal-Judah.
Now David wants it home with him in Jerusalem.
He assembles 30,000 of his best men.
They place the Ark on a new cart. However, that is NOT how the Ark is supposed to be transported. He was trying to show respect; but not following the Biblical Law, which was very clear on this matter in Numbers.
There is a parallel her between how David handles the Ark and is choice to break the laws concerning the king taking multiple wives and concubines. While the men and oxen are carrying the Arc, David is dancing, and playing music. I'm sure, once again, he thought he had a good reason to do it his way. His way was worshiping the Lord. But as Saul learned, the worship God wants is obedience. If David had had men carrying the Ark, per the Law and David solemnly attending to it (saving the celebrating for when it was where it was supposed to be), then there would have been different results.
How do we know David was more concerned about himself in his rationale than with worshiping God... he got angry when God got angry with him. If it had been all about God, then God getting angry would have mad David want to please him- as he eventually does.
I'm not judging, even though I sound like I am. I just recognize the spirit of the moment. And I think it's common in some denominations of the modern church: Caught up in emotion, mistaken for devotion.