It would if it were an emergency. Airlines typically get their non emergency work done at their own hubs where it costs less as opposed to paying a foreign contractor. Toilets don't suddenly break overnight especially on a plane that costs 100s of millions of dollars. SFO maintenance may have been aware of the problem and chose to defer it, or worse may not have caught it during scheduled inspection. Notice how most of United's problems of late involve flying in or out of SFO where their largest maintenance facility is located.
Well, they definitely blew that one. The costs rose considerably by that decision. Do yo u know who makes that decision, the pilot?