How often do Star Wars soldiers, starfighters, fighter ships, and what not waste shots in a similar manner just to punch something till the other guy\ship is down for the count?
Soldiers, fairly often, about in line with what happens with IRL soldiers, (I saw somewhere where modern combat has like ~500 rounds per kill.) Starfighters and Capships tend to be very 'Ship of Sail' due to the capability of shields to absorb 'impacts' being higher than a ship's capability to dish out punishment. This only really changes in the Imperial Era, with small-craft becoming more relevant.
The necessary infrastructure for a Railgun to be a '1-hit' weapon requires the creation of an Onager-style platform where the ship is built around the railgun, forcing it into a Sniper/Marksmen role, and in that situation, wasting shots is a
very bad idea.
If we used railguns I imagine the targeting systems and shot waste wouldn't change all that much.
Railguns, for a multitude of reasons I don't want to have to outline here because it'll probably become a derail, are not viable as a 'turreted' or 'broadside' weapon, in comparison to Turbolasers and Ion-cannons.
Heck railguns would do more damage because they'd could penetrate a capital ship's armor and damage the other side rather than scuff the armor on this side.
Turbolasers are quite capable of punching through Capital armor, as seen in the multiple times where a ship goes down within a short time of their shields popping unless they significantly out mass the attackers (SSDs versus most anything else,) or are noted in-universe for their abnormally large amount of armor, (Dreadnaughts.)
And like was said above. Explosive rounds plus calibration could keep the advantages without hitting friendlies on the other side.
As Thorgon has said:
the problem with explosive railgun rounds is that they massively increase the cost for little benefit, a railgun round can easily be made of a solid lump of magnetic metal and work just fine but trying to include an explosive disposal charge causes lots of engineering and supply problems
But there's also the issue of trying to find an explosive material that produces enough force to make it advantageous to reduce the overall mass of the round. Something like Nuclear or even Fusion weapons might not be enough, making the round itself less potent.
Also, as a final nail in the coffin, SW FTL allows you to drop basically on top of your enemy, making it
extremely difficult to maintain the type of range that puts Railguns into a dominant position over plasma and other 'short range' weapons. No sense putting a big ass hole in your ship if all it'll do is provide easier access to your reactors.