The bill overcame opposition from Coca-Cola, Nike and Apple and an initial lack of White House support.