These comments were after the deal had soured. Not before. If it was a case of such morality, the partnership with Palantir would have never happened in the first place.
The contract was explicit - it was for defence purposes with a company known for spying activities. So, obviously spying is involved and they weren't just going to generate cat videos with it.
Again, nobody is innocent here.