Mileage is calculated "as the crow flies" from origin to destination for each flight number. So, in your case because the flight number didn't change mileage was calculated and awarded as if your plane took off from SFO and flew straight to DCA. Note this would be the same irregardless if you changed planes in PHX, as long as it's the same flight number.
If there was a flight number change, you would get two separate segments credits, one SFO-PHX and a second PHX-DCA. This is standard practice at most airlines and would not expect US to adjust your mileage, but it's always worth a call or email to see if you might get it changed.