This is heavily diluted when you expect tips for anything else, and it makes it very obvious it's just a hidden fee that may or may not even be going to the workers. Wage theft is the largest type of theft in the US, and a non-insignificant amount comes from tip pooling schemes where owners and managers take a dip.
I tip my barber because they took extra time and attention to ensure I had the perfect hair cut and beard shaping to look good in my workplace or on a date, or whatever. I am not generically tipping for having done a business transaction, the person who took my appointment over the phone is not the person who cut my hair. I am giving a thank you gift to the barber because they took time and attention for /me/ /personally/.
FWIW, I appreciated restaurants that had a menu option to buy a round of beers for the kitchen. I would do that every time it was presented to me, above and beyond a tip. To me, when I tip someone who rendered me a personal service (especially a service where I have a conversation with them), it's me saying "I'd buy you a beer and say thank you, but I can't do that right now and you have other customers, so here's some cash as a thank you.".
Diluting that meaning eliminates the reason I'm willing to tip in the first place.
That's a direct 1-1 transaction. You are getting a hair cut, so if it's good, you'll come back. If it's bad you won't. Charge what it costs and give the best service possible.
Granted if they go above and beyond maybe I would tip (buy yourself a beer as you say, but it would have to be more than "they cut my hair").
That's the slippery slope though, whereby if you don't tip you are deemed to not be happy with the service, and so the emotional imperative is to tip to not offend.
Possibly related, I moved last Summer and it took me until January to find a barber I've now been to repeatedly. I have really high expectations and before moving I had been going to the same shop in my previous city for more than a decade, and was on a first-name basis with my barber there and his wife and eldest son and sometimes hung out with him outside of work (mutual interest in classic cars). For me, the tip is absolutely a direct and personal thank you gift, because I have very high standards not many people can meet, and few that do get it right the first time and as a matter of course. I generally tip well, though.
All barber shops are different, but usually the person cutting your hair is renting space from the owner of the shop, who may set prices. You can use this knowledge to affect your willingness to tip (or not), just in case you're not tipping because of an assumption that may or may not be valid.
> charge for what it costs
I think that's a bit tricky, I don't think the true cost of a haircut is fixed day to day. On slow business days when there is no line, a slow and careful haircut doesn't really 'cost more' than a quick haircut because the daily throughput is the same. But on days when there are a lot of people lining up for cut, slow haircuts will reduce throughput and therefore have an opportunity cost. (This is for a walk-ins only barber.)