Two things.
Who was killed?
The scum Vader killed on Mustafar were not just the Trade Federation - they were the military and economic leaders of the Confederacy of Independent Systems, the separatists. That included the leaders of the Trade Federation, but also members of the Corporate Alliance, the Commerce Guild, the Banking Clan, as well as senators from various planets and species.
The group as a whole was Separatist Council; there was also a Separatist Senate/Parliament, for legislative issues. They were not present on Mustafar.
Why were they killed?
They knew about him. They knew about his machinations, they knew he was a Sith, they knew he was behind the Clone Wars all along.
Weren't they making money for him
He didn't care about the money. Money was their concern, not his - to Sidious, money was never more than a tool he could use to gain more power. When he had all the power, he didn't need the Seps any more.
and also fighting his enemies?
No, they were fighting the Republic. Sidious's enemies were the Jedi; with the Jedi gone, the Clone Wars had served their purpose and were no longer needed. At this point, the Separatists could be shut down and folded back into the Republic-turned-Empire. This would be easier, of course, if the Separatist leadership was dead.