The nice things about tips is that it adds voluntary price discrimination. If you want to pay more you can. A raised price on the other hand raises a price floor which may disuade customers who are more cost sensitive.
It’s interesting because the origin of tipping in the US came about during the post civil war period, when black people needed jobs but nobody wanted to pay them because you know they had been doing it for free just a short while ago. The expectation was that the guest would pay them, not the employer. I guess we still have that mindset.