UA often has different fares for LHR-SFO return on the US site and the UK site. I simply book whichever is cheaper. However, you have to pay with a card with an address in the relevant site’s country. The OP has simply used the workaround that has often been discussed here.