Here is the code in question:
// physics stuff
vm_vec_sub(&pos, &cargo_objp->pos, &objp->pos);
impulse = pos;
vm_vec_scale(&impulse, 100.0f);
vm_vec_normalize(&pos);
// whack the ship
physics_apply_whack(&impulse, &pos, &cargo_objp->phys_info, &cargo_objp->orient, cargo_objp->phys_info.mass);
That vector is wrong; what it's doing is comparing the centers of the two ships. It should use the dockpoint normal as Trivial Psychic says. This explains why some cargo containers get hung up on their ships.
Furthermore, since not all dockpoints are equally distant from the centers of their host ships, the farther dockpoints will be ejected with greater force than the closer dockpoints.
The best solution is probably to write a new jettison-cargo sexp and deprecate the old one. The new sexp should use proper physics and provide an optional argument for ejection force. I should be able to do that tomorrow.