2 Sam 6, and 1 Chr. 13 & 15 tells us that when David brings the Ark into Jerusalem, there was a great celebration. Everyone was rejoicing that the Ark was coming home to the capital city. All during the reign of Saul, the Ark of God was left forgotten in the house of Abinadab on some hill. Now, David had pitched a new tent for it in Jerusalem and was about to put the Ark where it belongs, in the center of Israelite life.
However, the celebration came to an abrupt halt when the oxen towing the cart came to the threshing floor of Nacon. The ark swayed to one side and it looked as though it would fall of. One of the sons of Abinadab, Uzzah, had been walking along side the cart, and reached out to steady it. God struck him down for the irreverence. David was both angry and afraid. He wondered how he could get the Ark to come to him in Jerusalem. They took the Ark no further and it remained in the house of Obed-Edom. When David heard that Obed Edom's house was being greatly blessed, he attempted to move the Ark again.
This second time was different. Instead of the military processing, David organized a priestly procession of Levites. Instead of hauling the Ark on a cart like some commodity, he had inquired of God according to his ordinance and found that only the Levites were to carry it and do so on poles in the ringlets. David continually offered up sacrifices as the Ark progressed into Jerusalem. He celebrated with great joy by dancing before the Ark with a linen Ephod as the Ark came to Jerusalem. The text does not say how David dressed during the first attempt. Since it was a military procession, perhaps David was dressed in military regalia. However, he is now dressed in priestly attire, in an ephod.
There is a lesson we can learn from this: Rejoicing without reverence is repulsive to God. The first attempt had the Ark in a cart, which is where you put commodities and goods, not an honored one. Dignitaries get carried by servants on poles, not hauled around in a cart. The first attempt also did not follow God's explicit instructions for the Levites to carry the Ark of God, in which dwells the name of the Lord of hosts who sits enthroned above the cherubim, on poles inserted into the ringlets. God was not treated with reverence when they did not follow his instructions.
However, on the second attempt, David could rejoice with abandon and God approved of it. The Ark of God was carried by priests, not in a cart. David's wife, Michal, did not approve of David's joy. She was embarrassed at his shameless display of jubilation. David told her that he would be more lightly esteemed than this. David understood he was nothing. Unlike Saul, he had no pride or ego to stroke. He understood that God had chosen him and established his kingdom. The text shows that God was not pleased with Michal's denunciation. God did not bless her with any children all her life, which would have been a stigma.
God wants us to rejoice, but our joy is to be "in the Lord." David is an example of this. His passion in life was his relationship with God. God is delighted when we rejoice in Him. Our joy is to not to be self-centered, but God centered. It is to be in loyalty to God. Any other kind of joy is repulsive