Credit card churning is not illegal but each credit card company has their own policy in regard to this practice. So, if you decide to pursue this strategy you'll need to understand what it takes to be within the guidelines of each of your bank accounts and credit card issuer's terms of service.