To allow for sufficient growth. The midgut is responsible for forming a big part of the GIT, which won't fully develop if the herniation doesn't occur. Plus the rate of growth of the midgut exceeds the rate of growth of the abdominal cavity. In the time it takes for the herniation to complete, the abdominal cavity hasn't reached a size capable of holding the midgut. Third, the midgut needs to rotate, by 270 degrees (if I remember that correctly) which can't occur inside the abdominal cavity because again, there isn't enough room yet.