The Consumer Product Safety Commission is struggling to contain the fallout from a data breach involving thousands of companies, highlighting the tension between the agency’s mandate to protect consumers and to prevent reputational damage to product makers.