That's not how it works. If it were, then Vanguards would have the advantage of having a better weapon than a Power Tech.
The sniper rifle isn't involved because that's a different class. The heavy cannons are roughly equivalent to the dual wielded pistols and vanguard rifles are equal.
On the main topic, I think that this is something that the game really needs. The classes feel too boxed in, like every trooper uses either a cannon or a rifle, but why not make power tech pistols available, or even allow me to put rifle mods on an orange pistol to make the same piece of gear, but with a different look.
My guess is that it mostly has to do with the animations. Shockstrike looks a lot different from Rocket Punch, and you couldn't use the same animation with a pistol. However, it does seem like they could just use the melee animation that smugglers use.
In any case, I'm hopeful that they will implement more gear choices for classes in the future. I personally prefer customization and choice over being railroaded, even if it does mean that my trooper or jedi or whatever has a tighter personality (which I actually also don't care for. Maybe I'm playing the wrong game.)