The buildup of pressure occurs because a portion of the solvent vaporizes when the separatory funnel is shaken. An attentive student will notice that when the solvent is water very little pressure buildup occurs. That is because water has a relatively high vapor pressure at room temperature, and it is less willing to became a vapor. In your case, however, the solvent was diethyl ether. As you know, diethyl ether is extremely volatile at room temperature. By putting it in a separatory funnel and shaking it around, you are releasizing a significant portion of it inside the container. Eventually, after a certain amount of ventilation, the buildup of pressure stops, which may be because the most energetic molecules have escaped, leaving behind those that lack the same propensity to leave the liquid state.