Private companies cannot under federal and provincial law "do whatever they like". I don't know where people get this idea. Its not true in any free western democracy, and certainly not true in Canada. There are mountains of legislation and regulations and policies that regulate human affairs.
I had a career as a gov't public servant regulating the activities of private companies with numerous Legislation, Regulations, Policies, and Guidelines. Less of this regulatory stuff is preferable of course, but in a dog-eat-dog world, chaos would erupt without reasonable regulation of human activities, especially around natural resource access and consumption, and public safety, and sustainability. I love freedom and my rights, and I want more rights and freedoms, but with millions of people in a finite space and finite resources, its all a balance of interests, fairness, tradeoffs and compromise.
Private companies that provide a service (e.g. courier) cannot discriminate against law abiding people by choosing not to provide service. The "grounds" of discrimination are detailed, legally complex and evolving, so case law is setting new precedents all the time. There are provincial human rights codes laws, and federal Charter of Rights and Freedoms laws. I am not qualified in any legal knowledge in this matter so I have to throw it out to the lawyers and legal experts in discrimination law and policy to interpret and provide leadership. Lawyers and legal beagles - we need you to provide leadership.
"Creed" is one of the prohibited grounds of discrimination, well tested in case law at provincial and federal levels. (Creed BTW is not "Religion" which is a separate "grounds", although it can be related). Refusing service based on a customer's Creed is against the law, unless it can be proven that it conflicts with another law or strong policy. Company ideology is not a defense. It is Creed as a grounds for discrimination that I think a case could be won in court for discrimination against gun owners and gun shops who want to legally ship legal merchandise that has been shipping in Canada since Confederation and before. The history of a practice does carry weight in decisions about heritage, culture and Creed. The shipper cannot deny service just because they are anti-gun or have some ideology against it.
I think a legal case could be made that hunters and sports shooters value shooting as part of their lifestyle and as part of their very being down to the core, i.e. its part of our Creed. It is much deeper than "just a sport". Hunting rights using firearms has already been well tested in court for Indigenous hunters as an essential part of life, i.e. Creed. Its just as important for me and most folks on CGN. My ancestors all hunted, and target shooting is part of building hunting competency. Target shooting has been an organized sport since before Canada was born, and throughout Canada's entire history.
There are also human rights case law that I know next to nothing about, but there is a relationship in firearms and ammo ownership that is directly linked to the #1 human right which is the right of all persons to self defense. I think a case could be made that the State cannot deny the rights of Canadians to own the tools and ammunition of our ancestors to defend ourselves today. That would be crazy. The State cannot reduce our self-defense abilities by making us use knives or swords or spears or bows to defend ourselves. Therefore courier companies cannot deny firearms and ammo shipping service by practicing discrimination.
As to this hazardous goods argument, I don't buy it. Like I said in an above post, hazardous goods are being transported every second of every day across this great country, and every vehicle gas tank is a flammable/toxic/explosive on wheels, rail or in flight. Vehicles also kill and injure people, etc. The hazardous goods argument is bogus.