Now, it should be noted here that the wrestlers, circus performers, and superheroes weren’t actually wearing underwear, but rather tight underwear-like shorts over their leggings. As superheroes are generally incredibly gifted athletically and perform amazing acrobatic stunts while crime fighting, it was natural enough for this style of dress to get adopted by the earliest superhero artists for their characters. – Gizmodo

Source: https://www.elitereaders.com/why-comics-superheroes-wear-underwear-outside/

https://i2.wp.com/den-i.com/wp-content/uploads/2017/05/dc-superheroes.jpg?fit=1024%2C768https://i2.wp.com/den-i.com/wp-content/uploads/2017/05/dc-superheroes.jpg?resize=150%2C150denCreativeDesignShared Linkcomic,DesignNow, it should be noted here that the wrestlers, circus performers, and superheroes weren’t actually wearing underwear, but rather tight underwear-like shorts over their leggings. As superheroes are generally incredibly gifted athletically and perform amazing acrobatic stunts while crime fighting, it was natural enough for this style of dress...Tech & Design stuff