Water hardness can not cause an anode rod ‘failure’. Bacteria (sulfate, iron and mangnaese reducing types), stray current and bad electrical grounds or lack of grounding, do. Low pH (acidic water) might.
The anode rod is supposed to be sacrificed in place of the steel of the tank being corroded, so once the rod is incapable of protecting the steel, it will corrode.
Quality Water Associates