I know it isn't the game itself, but still
I don't any of the details of the actual deal between SF and the NFL, so this is all just conjecture. However it is based on personal experience with the way Vancouver does things.
Generally a city decides that their cost of hosting an event is an investment in the city's overall economy.
SF may have decided that hosting the Superbowl is good for tourist and convention 'branding'. This will put SF front and centre in the US media for a lot of people - and also some international exposure. It has been shown that the tourist and convention traffic increases after hosting an event like this. It's not as big as the Olympics or a world Expo.. but it's something.
The increased jobs during the event itself. There will be tens of thousands of people in town for the event (I'm guessing at the number, but I'm sure the city has it somewhere on their website). Those folks are going to need hotel rooms, food and liquor. They're going to go shopping, and they're going to see the sights. There is going to be a short intense economic spike that weekend. The usual rule of thumb (iirc) is that every new $1 in direct spending equates to about $7 in spinoff economic benefits. With the state and city getting sales sales tax and income tax from that spending.
The massive logistics of broadcasting the Superbowl means that there are thousands of technicians and journalists in town. See the benefits of the paragraph above... plus add the benefits of needing to rent broadcast suites, lights, sound equipment, hire local talent, etc etc. Most of that stuff will be imported from the home HQ - but there is always the stuff you left behind that you need to rent
now, whatever the cost. And the local talent that is cheaper to hire in town rather than bring and pay and house for the weekend.
Then there are the thousands of out-of-town police and security personnel who will be in town. They all need to be housed and fed. And when not on duty they will be shopping and seeing the sights too - but probably not too much of it... they'll be busy keeping people safe.
If SF has done their math correctly, and not made overly optimistic assumptions they will come out way ahead on the deal... even without the tech corp. contributions.
Where a city gets into trouble is when they assume that they will reap the maximum benefit on each spinoff, and then underestimate the real costs. I have no idea how good or not SF City Hall is...