That other A319 that's sitting there might be scheduled to fly to LAX or SFO the next morning. Weather was pretty bad yesterday - your 4 hour delay was because a flight operated by that A319 you were waiting on was diverted earlier in the day due to weather. So maybe that A319 never makes it to IAD and has to divert elsewhere and weather doesn't clear up for several hours, and the crew has already timed out. Or maybe a mechanical issue comes up that keeps it grounded. Several things could stop it from getting to IAD that night.
This becomes a problem when you consider connecting flights. RDU isn't a hub. No one flying IAD-RDU is connecting elsewhere, at least not on UA. And if they're connecting to another airline on a separate ticket, UA really doesn't care because it's not their responsibility. That other A319 that might be sitting there and might be going to LAX or SFO would likely have some passengers, perhaps several dozen, connecting to points beyond, such as Hawaii or Asia. In the off-chance that they put the RDU flight on that A319 that's already at IAD, then the incoming A319 is diverted and can't make it to IAD, now they have to cancel or delay the LAX/SFO flight and they have to re-accommodate a bunch of passengers who just missed connections. It's easier to just let you guys be a few hours late to RDU because I doubt anyone missed a connection that UA is responsible for. The A319 that's already on the ground is a sure thing for the flight to the west coast hub (well, more of a sure thing than a plane that's not even at the airport yet, things still happen).