Taxis/Ubers, I usually just add a couple bucks to the fare, or just pay with a slightly larger bill on purpose, and have them keep the change (if a $17 fare, give a $20). Similarly, bellhops at hotels are a similar role of giving a couple dollars instead of a percentage once they've brought your bag to your room (as there is no exchange of money during the entire process). Valet drivers are another example.
Hairstylists should be tipped because their payment structure is different. They aren't usually employed by the place you get your hair cut at, rather they lease a chair from the location. They are forced to use the prices displayed, and they get a small cut of that. You then tip them additionally depending on how well of a cut they did. I personally usually do (with a $15 haircut as an example) a $5-6 tip for a good cut, and $3-4 if it's just OK.
Your taxi driver gets most if not all of your fare, but it's still expected to tip them. A grocery store cashier gets none of your payment directly, but you don't tip them. Don't try to make sense of it, just do what others do.
Hair stylists, taxis, sit-down restaurants, they all usually need tips. You don't tip the stylist though if it's the owner as of course they would just set their price.
For food I can kind of understand of since they decouple serving and preparation + ingredients.
Note that I am not American and am new to tipping. Just curious