The existence of the phenomenon that "bad" is considered "cool" is attested by a simple search on the Internet (here, here, and here).
It can be also attested by the success of movies depecting anti-social but popular heroes (Scarface, Fight-Club, many films by Tarantino, etc.).
Research seems to indicate that the positive association between popularity (a proxy for "cool") and anti-social behavior (a proxy for "bad") is identified during adolescence, but not before of after this period (Estell 2019; Lansu et al. 2022).
But I was not able to find why "bad" is perceived as "cool", overall (in adolescents and non-adolescents).
Edit:
In the study mentioned in the answer below, the data are made of people suffering from personality disorders, so I am not sure the results would still be verified in a non-pathological population. I mean, relatively to other Personality Disorders, Impulsivity is positively correlated to reproductive success. It is not necessarily the case when compared to non-pathological individuals. It indicates, yes, that impulsivity (aka "bad") can have some appeal.
References:
Estell, D. B. (2019). Popularity/antisocial goals. Social goals in the classroom, 154-170.
Lansu, T. A. M., Findley-Van Nostrand, D., & Cillessen, A. H. N. (2023). Popularity According to Emerging Adults: What is it, and How to Acquire it. Emerging Adulthood, 11(2), 331-345. https://doi.org/10.1177/21676968211066668