I don't know why bare-chested superheroes would have violated the Comics Code. Comic book men were allowed to go bare-chested when they went swimming. Romance comics had plenty of topless guys hanging around the beach. Not one, of course, ever had nipples.
It may simply be changing tastes that account for the Silver Age shortage of bare-chested heroes. Personally I thought costumed heroes looked silly without a shirt. For that matter, so did superheroes wearing short-shorts, another Golden Age trend that faded away.
Link to the book:
Thrilling Comics 04