I am wondering whether it was something security-related. If you look at the flight track, they turned around just before crossing into Canadian airspace, just at the very tip of Washington State before reaching Canada’s Victoria Island. That may have just been a coincidence, though.
If it was a mechanical issue, then returning to KSFO makes sense, as I believe UAL does have a substantial maintenance department there.
Could it even land at KBFI (Boeing Field)? Their longest runway, 13L/31R is about 9,000’, which doesn’t seem like it’s enough for a fully-loaded 747.