San Francisco has probably the most complex payroll and gross receipts tax system of any city in the world. The calculator you're supposed to use is: https://sftreasurer.org/sites/default/files/2019-08/BT_2019%...
The item specifically relevant to Stripe is that it's categorized as a Financial Services rather than Information company. Financial Services companies have to allocate gross receipts based 50% on their payroll location and 50% based on their sales location. So while their portion of sales in San Francisco is negligible, most of their payroll is there.