Why do we like salt?
In developed countries we usually consume enough salt (sodium to be exact) without actually adding table salt to food. Everything can become toxic when consumed in excess - even water - and when we frequently add more salt to foods, we tend to consume sodium in potentially harmful excess. That's what your friends are referring to.

However, salt (sodium) is one of the most essential substances your body needs to stay alive, for several reasons. One of the main purposes of sodium is the upkeep of blood's osmolarity (i.e. concentrations of osmotically active compounds. Higher salt concentration on one side of a permeable membrane attracts water to that side - I'm sure you've heard that before). There are numerous systems in your body to make sure the osmolarity of blood is correct. If they fail and blood becomes hypo or hypertonic, your cells will be sucked dry or pumped full of water and in either case, burst and die.

Look up the renin-angiotensin-aldosterone system for example: when the kidney filters blood, it reabsorbs or lets through water depending on the current blood osmolarity; leading to higher or lower amount of higher or lower concentrated urine. You drink lots, your blood is diluted, it becomes less tonic, kidney registers that and lets water through more, you urinate more. There are many more elements involved there, including blood pressure, nerve signals stimulating thirst or hunger of different kinds, some hormones etc.

As you can see, there's a reason why the basic infusion given in hospitals to replace lost blood quickly isn't just water but normal saline.

Delayed update to pick up some side aspects of your description: 1) There are of course things that humans do which have absolutely no value to them whatsoever. Anything that plays into the feel-good-reward-circuit in our brain can become such an unhelpful habit. Take smoking and drug consumption as examples. 2) About evolutionary relevance: Being a key player in maintaining body function, evolution selected for instictively liking salt. Simultaneously, most people will not like food that is extremely salty - a protective mechanism against excess.