They all contributed and it's all gravy I think. As others said, it's like bench and practice squad players getting championship rings too. Except these swimmers actually helped them qualify.
I don't see why they allow different teams in the first place. I assume it is so they the big stars can be in as many finals as possible which generates publicity.
Also to me the Olympics have a much more personal flavour, where you have to strive to become your country's participant for a particular event which is a huge honor in itself since the games are every 4 years. But if the coaches are just changing the team willy nilly every round up until the final them it loses that effect. I think the Olympics should be different to just a regular seasonal championship.