That's a very troubling question.
The legal validity of that contractual provision, of course, would have to be determined by a judge. We have some serious doubts about whether any vendor or business can contract out the obligation to refund its customers in the event a service cannot be delivered. Even if it is a war, a pandemic or the sky is falling, it doesn't matter. There is a fundamental right for all consumers, in all contracts, to get back their money when they don't get the goods or services they paid for.
Setting that aside, the short answer is that Air Canada is doing this because it can, because the government is not taking action, is not taking enforcement steps against airlines that disregard passengers' rights.
With respect to Air Canada, the Canadian Transportation Agency could disallow the tariff provision tomorrow. The CTA wouldn't even need a complaint from us; it could simply look at it and say that this is an unreasonable term and condition, especially since Air Canada has gone public and made broad public statements to the contrary. Air Canada assured the public through its press releases that from now on, for tickets that are purchased, it would refund passengers if a flight is cancelled, regardless of the reasons. Air Canada is talking out of both sides of its mouth, and we haven't seen yet any enforcement action.