But that's just the practical problems with it. Thematically and aesthetically, Star Wars gives us laser guns in space. There's no compelling reason to "break" that aesthetic. What point would that serve? You wouldn't insert guns into Lord of the Rings because that would just be silly and pointless; why would you do it to Star Wars?
So, Star Trek mostly avoided projectile rifles, but there's two instances of them using guns that I always find interesting.
Both of them involving DS9, because DS9 is awesome.
"Field of Fire", one of the (rightly) maligned Ezri episodes in season 7, had a major point being that someone was running around DS9 killing people with a chemically propelled projectile rifle...
...but it was of Federation design, the TR-116, with all the advancements that could mean. Extremely strong slug and an advanced propellant, a scope with a linked eyepiece that could see through walls and the killer had even devised a small transporter on the barrel to transport the bullet right where it needed to be.
Beyond being supremely cool, it had a purpose in a primarily-ray-gun franchise: To have a weapon that actually killed people, a rare thing in Star Trek!
...also to match the barbarism of murder. That advanced as the Federation was, there was still murder... so an advanced version of a modern weapon.
The other one was one of the non-canon tie in books... and a good one too. "Fallen Heroes" has the station come under attack by enemies using armor that deflects away phaser fire and assault rifles that just wreck everything.
...yes, they're effectively wearing god-mode plot armor. It's still a tie-in book to a tv series after all.
The point of it though is twofold: First, to create nigh-invulnerable enemies for the DS9 crew to fight against in ways that showcase ingenuity, creativity and intelligence. You can't shoot them with your phasers... but if you modify the phasers right, you can turn them into grenades, which at least will knock them around.
...this may be the inspiration for Kyri's favorite move >_>.
But it's also to highlight, again, brutality. Time travel shenanigans ensure that none of it happened, so the writer is free to go all out, killing a whole lot of people, including main characters.
Because the point of phasers, blasters, lasers, basically all of ray guns? It's to make the killing clean. No blood, no gore, no seeing anyone with half their face blasted off. Shoot them with this gun and turn them off.
That's one time when slugthrowers can really work in Star Wars, why it does kinda work with Mandalorians: To make the killing
not clean and pretty. Guns are loud, ugly, primitive, nasty. They blow holes in things, cause a cacophony, leave the dying suffering as they breathe their last...
It's not a good standard weapon, thematically speaking... but sometimes it's good to switch things up a bit.