The G19 is definitely an accurate gun. If someone isn't grouping well with a modern day firearm, it's user error, not the gun. Most, if not all of the guns these days are more accurate than we could ever be.
And by "user error" I don't mean "you suck"
I just mean that as a beginner shooter, one has many potential bad habits to overcome that influence how small or large your groupings will be. Flinch, trigger jerk, grip, stance, etc. Within this learning curve, there will be certain guns that just "fit"... allowing you to shoot it better than others.
But as you get more experienced, and fix some of those potential bad habits, your ability to shoot many guns well will increase.
I shoot my Glocks best. I always have since the beginning. And there were some guns that I just didn't shoot as easily/well (HK, Sig). And these are guns that are easily just as accurate as Glocks. But after going to the range a LOT...I figured out that my trigger pull was the key factor for me... and after having really payed attention to my trigger pull...ie: PRACTICE... I've gotten to the point where I can keep all the rounds in the black with any of my semi-autos, taking my time, of course. Glock, HK, Sig, 1911, Beretta.
As you learn, figure out what you need to improve, PRACTICE... and you'll eventually get to a point where you can pick up any gun... and shoot it well.
If you want to talk about J frames though, forget about it. No matter how I grip it, how I pull the trigger, I can't hit the side of barn from 5 feet.
Though, it's the gun I shoot the least. Go figure
My brother, on the other hand, can put all 5 rounds into a nice 4 inch group at 30 feet.