The inner reason for such conduct is that it is based on the concept that we are constantly drawing closer to Mashiach.
Indeed, immediately after the destruction of the Beis HaMikdash, the Jewish people had already embarked on the path leading to the coming of Mashiach. Thus, the Midrash relates that from the moment of the destruction, it took only “as long as the bellowing of an ox” before “the redeemer of Israel was born.” From that time onward, from moment to moment, we draw ever closer to the time when it will be as G-d declared, “My servant David will be king over them” – over all Israel – as “a leader for them forever.”
Therefore – following Rambam’s ruling – the [chassidic] practice is to follow the approach of “My servant David” – to express joy in our Divine service, “leaping and dancing before G-d.”
References:
- Eichah Rabbah 1:51. See Likkutei Sichos, Vol. 2, p. 359ff.
- Yechezkel 37:24-25.
- At the conclusion of Hilchos Lulav, Rambam writes: The happiness with which a person should rejoice in the fulfillment of the mitzvos and the love of G-d... is a great service.... Thus, David, King of Israel, declared (II Shmuel 6:22), “I will demean myself even more than this,” because there is no greatness or honor other than rejoicing before G-d, as (II Shmuel 6:16) states, “King David was leaping and dancing before G-d.”