These anti-avoidance rules are developed in the context of RRSPs, mainly, and tax-free savings accounts. Perhaps the potential harm is clearest in those cases, but also definitely seen in the RESP and RDSP sphere.
There are essentially three different concerns that are addressed by these rules. One is improperly removing value or property from a tax deferred account. Classically, if you have money in an RRSP, you're taxed on the way out, so it prevents the avoidance of that. There is getting a deduction for or some sort of other tax benefit for contributing amounts to a plan.
Then there's also the inappropriate shifting of income to a plan with certain tax advantages. A very simple example might be if I had an account, and I put in $100, used that $100 to buy shares of a company I control, and then paid as much dividends as I wanted into it in order to just shelter all my money in say a tax-free savings account.