This one sidled by when I wasn’t looking, OP, but I see it’s in OED under rock, v, 1 and it’s been around for years.
12 c. To wear, esp. with panache; to display, flaunt, or sport (as a personally distinctive style, accessory, possession, etc.).
1987 ‘Boogie Down Productions’ Elementary (transcript of song) in http://www.asklyrics.com (O.E.D. archive) , Watchin all these females rock their pants too tight.
I’d say it’s a natural extension of sense 10d
10 d. slang (orig. U.S.). To be full of energy, life, and excitement; to be excellent. Freq. in exclamatory phrase —— rocks!
1969 Times-Bull. (Van Wert, Ohio) 3 Oct. 2 (advt.) Bored? Uptight? In a box? Weekend bowling really rocks!
BTW earliest cite for dance to a beat seems to be 1938, sense 9b
9 b. colloq. (orig. U.S. Jazz slang). To cause to dance or move rhythmically to music; to enthuse or thrill with a musical performance. Also: to instil or inspire with energy or enthusiasm; (broadly) to impress.Also with a location as object.
1938 C. Calloway Cat-ologue: Hepster’s Dict., Rock me, send me.