why do they sometimes specify the federal law as well as the state/provincial law? Isn't it redundant?
Not necessarily. The contract might be entered and/or performed in a different country, whence mentioning only the Canadian provincial law does not override the other country's federal law (or that country's "supra-provincial" equivalent). Mentioning Canadian federal law removes --at least on paper-- the ambiguity of which law applies for matters beyond the scope of Canadian provincial law.
In such scenarios, portions or the entirety of the provision might be null and void. For instance, an employment contract might establish waivers which are void or perhaps even unlawful under the legislation of that other country.
Please note that in general a copy/paste of sample clauses is strongly discouraged unless the parties fully understand their meaning and implications.