Of course it’s against the law, and so is not obeying the speed limit. And both are being done every day widely and more or less blatantly with little to no chance for consequence. In fact you’re probably more likely to get a speeding ticket than to be audited. Hence the CPAs who would recommend some of these “strategies” as long as there’s even the slightest plausible justification, because in their experience there’s very little risk for pushing the envelope.