While this is technically a violation of UA's conditions of carriage or related legalese (so they could try to cancel your Mileage Plus account or something), in practice throwing away the last part of a multi-segment itinerary almost never incurs consequences. Since SFO is your port of entry to the US your bags will have to be routed there for you to collect and clear customs with; at that point you can just walk out of the airport instead of giving them back to UA for the onward flight.