For one, you’re not paying the Starbucks employee so they can be consumers out of the goodness of your heart. They’re charging what you’ll pay because that is capitalism.
If you don’t want to pay the Starbucks employee, you don’t have to. You can go brew your own coffee, but you probably figure $2 isn’t worth your time so instead you’d rather just pay them for the convenience.
The other great thing about all this is if you don’t like how San Francisco wants to tax you, you can leave. And it’s not even like leaving the country or even leaving the state. You don’t actually even lost anything of substance.