First of all, I would really recommend you to separate the projectiles being spawned from the gun weapon model and its animation. Attaching the spawn point to the gun model just causes unnecessary problems and unexpected behavior (like bullets flying into unexpected direction because you are shooting while still blending to the weapon switching animation). Rather attach the spawn point to the root of the character object, so you have better control over where the bullets spawn. The less surprises, the better. And now your animators are free to animate the gun and the character's hands the way they want without having to worry about the animation exactly matching the bullet spread pattern.
But that still does not mean that the recoil pattern can not be controlled through an animation. The Unity animation system is very versatile. It can do more than just control the bones of character models. It can "animate" (almost) any inspector-visible attribute of any component. So it is perfectly possible to create an "animation" for how the point of aim and random spread of a weapon changes over time while the gun is shooting. This allows you to edit the spread patterns of guns by editing curves in the Unity animation curve editor, which can be a very designer-friendly and powerful tool.
A code-based solution might be less intuitive for a designer, but more intuitive to create for a programmer. You might also be more comfortable with designing your recoil patterns as mathematical functions rather than by dragging around curves until they feel right. So that's also an option.
In software development, there is never just one solution for a problem. There is also usually not a best solution. Only the solution which is best for you.