It worked because not just the development costs were paid for by the government, but acquisition costs were, too. Planes were given to the airlines for free, completely paid for by the states.
Also, only be BA made good profit on it and only after mid-1980s. Air France could barely break even.
If not the PR effect that put those airlines above all others as the only ones flying supersonically, they'd never make any sense to either of them.
These days, they'd certainly not be viable as private planes are now much more available and much cheaper than they used to be back in the day and these save a lot more time than supersonic flights. BA fare for LHR-JFK roundtrip was 10K pounds back in 2000, $15.2K at the average exchange rate, that's $28K inflation adjusted! Who'd pay that kind of money today for a commercial flight?