why not have a full time janitor who cleans after each visit? much cheaper than a self cleaning toilet. even if you pay $100k to the janitor in annual salary, it will take 10+yrs to reach 1.7M and who knows what kind of issues these self cleaning toilets will have in that 10yrs.
Because a human who can afford to live in San Francisco almost certainly costs more than this machine over 10 years (the 1.7 million is for the whole project, not just the self cleaning portion), and drugged out crazies can make a mess that would be a very hard and unpleasant job to give a human.
Sure, substitute live in San Francisco with live in commuting distance of San Francisco. It's not like Daly city or Oakland are cheap either.
Even when we focus on the fiscal aspect of it, I don't think a machine is a bad idea compared to a plan of "find some willing to clean up after addicts and the mentally ill at all hours" - how much would you need to be paid to take that job and show up to outcompete the toilet-dishwasher-machine every day? California has tons of other jobs and generous social programs.
And that's ignoring the angle that we're allocating a human life to this extremely unpleasant and automatable task.