Shrimp need to molt regularly to survive. To do it they need calcium and a small amount of magnesium. If it is not available they cannot molt. Also if there is too much again they cannot molt. They really cannot adapt to water that is too soft or too hard.
Also the amount of GH and KH affects the amount of water that is in their bodies. When introducing them into a new tank they need time to adjust their own body chemistry to handle the different pH, GH, and mineral levels present in the new tank. Sometimes they can adjust very fast and other times it can take hours. Since there is no way to know how long it will take always assume it will take hours.
GH is a measure of the amount of calcium and magnesium in the water. If it is zero shrimp cannot molt and will die. Plants will also not grow well and that can lead to Algae issues. The calcium and magnesium can be in the form of sulfate or chloride salts or carbonates. Plants and animals prefer the sulfate and chloride salts since they dissolve easily in water. Calcium and magnesium carbonate don't dissolve easily in water and are harder for plants and animals to use.
KH measures measures carbonates which most frequently are sodium bicarbonate, potassium Bicarbonate, Calcium carbonate, and magnesium carbonate. When you have excess sulfate or chlorides in the water The PH drops. The carbonates will react with the excess sulfate and chloride forming new chloride or sulfate salts that will not affect PH. Helping to keep the PH stable.
Where does the excess sulfate and chlorides come from? They come from the GH. Plants need a lot of calcium and magnesium to grow. They also need sulfur and chlorine but only in much smaller amounts. Since the calcium and and magnesium are in the form of sulfate and Chloride salts plant growth will reduce the calcium and magnesium levels faster than sulfur and chlorine. This causes the PH to drop. If you don't have any KH in the aquarium the PH may drop low enough to harm the plants and animals in the tank.
For a healthy tank you need a stable GH, KH, and PH.