With a missile coming toward you at Mach 2-3 you don't want to be shooting subsonic cannon shells at it.
The rail gun ammunition is much smaller so you can carry much more of it and make a much more mobile gun turret because it doesn't need to store tonnes of shells or have a feed back to a magazine.
They'll be able to hit incoming missiles, but the primary strength of the system is as long-range artillery for land attack. It won't have the rate of fire you'd need to defend yourself against multiple incoming missiles.
With a missile coming toward you at Mach 2-3 you don't want to be shooting subsonic cannon shells at it.
The rail gun ammunition is much smaller so you can carry much more of it and make a much more mobile gun turret because it doesn't need to store tonnes of shells or have a feed back to a magazine.