Rams are notoriously sensitive and are known to sometimes drop dead in pristine water. Your water quality sounds good, so assuming you have a proper sized tank and tank mates, it was likely an issue of bad stock
IMO.
Just to be safe, you should also rule out temperature fluctuations, any sort of contaminant, and acclimation.