The way air brakes works is that the locomotive's compressor charges the brake cylinders on the freight cars. The air pressure in the hose keeps the cylinders charged. When an engineer brakes, the air in the cylinders release air into the pipes connected to the brake shoes. When the engineer dumps the air as in emergency braking, all of the air from the cylinders are dumped onto the brake shoes stopping the train.
However, if the cars are sitting in the yard, the air will bleed out slowly. Eventually, the pressure in the system is the same as the surrounding air. When this happens, and the cylinders are not recharged, the cars cannot brake.
In a rail yard, they either hook up a yard air hose for longer cuts, or for shorter cuts, they set the hand brakes. (brake wheels). In common practice, they do not hook up the air hoses when switching cars, they simply release the hand brakes, and move slowly. The reason why 777 (or in real life, CSX 8888) ran away was because the engineer thought he was dynamic braking but throttled up instead.