Because dark chocolate contains rich flavonoids which provide some kind of protection against UV, according to a german study
"The skin of the women who had received the flavonoid-rich cocoa did not redden nearly as much as did the skin of recruits who had drunk the flavonoid-poor beverage. Women getting the abundant flavonoids also had skin that was smoother and moister than that of the other women."