It is not illegal in the U.S. per se, I would challenge those stating so to provide references to the law or case law. It could be illegal if you're doing a set of offsetting trades with no potential gain to transfer money from a taxable to a tax free (i.e. IRA) account, for example if you buy SPY options in one account and sell identical SPY options in the other in an activity that can by definition have no net profit and in fact loses you money on commissions. This runs afoul of the economic substance doctrine codified in sections 6662, 6662A, 6664, and 6676 of Section 26 US Code, which broadly state that any transaction without economic substance or business purpose that results in tax avoidance is illegal. There is no problem with the transactions, its the tax avoidance part thats illegal. Again with the CFTC/SEC, if you're doing it to manipulate markets then the market manipulation part is illegal, but just doing it is not and there's no per se standard that this type of trade is automatically manipulative.
Note that this has nothing at all to do with what Hillary Clinton was alleged to have done with cattle futures, that was about trading without sufficient margin and misallocation of profits from another account to hers. But thanks for reminding us that election season is coming up and we need to bring every conversation we have, no matter how unrelated, back to some kind of negative hit on the candidate we don't like!