it is because of SFO and LAX has bunch of delay to start with, the airport prioritize longer flight that is already in the air then shorter flight and sometimes require them to stay longer in the origin airport.
also sometimes when a little delay has happened, they realize the next flight has enough space (which is one hour later) they cancel the delay one and just put people on to the next flight