Yes, and like all forms of energy storage, there are inherent efficiency losses.  But electricity is not the same value at all times of the day. However, pumping water offers us the capability to absorb surplus energy during off-peak periods, storing it in the upper reservoir, and subsequently releasing it to generate power when needed.

For instance, during the height of solar generation in the midday when electricity prices are low, or even negative, and many are away at work or school, we can store the excess solar energy by pumping water to the upper reservoir. Then, as the sun sets and demand surges in the early evening when people return home, water can be released downhill again so the stored energy can be utilised to meet this peak demand.