Does a Dance Hall Keeper License have any purpose other than revenue generation (currently or historically)?
Prohibitions against dancing, especially drinking and dancing in the same venue, have a long history in the United States. It was not until 2017 that New York City repealed its Cabaret Law, which forbade dancing at establishments that served food and liquor without said license.
So the purpose is to not get fined if people dance at your bar, club, or restaurant. If you're asking if it serves a purpose in terms of public interest, that's a question for Politics SE.
The requirement of a license makes it easy to prohibit this conduct if improper safety measures (mostly lack of sufficient emergency exits) are present.
Also, dance halls (a.k.a. nightclubs) often trigger "not in my backyard" (N.I.M.B.Y.) opposition from neighbors, so a license provide a means of facilitating public input on, and limiting the availability, of a use that is not popular in some locations.