It wasn’t the French assisting the Americans against the British. It was the French assisting a rebellion started by some British colonists against the British government. In other words, they didn’t really care about why the rebels were rebelling, they didn’t even consider them to really be anything other than British, but they were willing to fight the British government, and that was good enough for France.