The stem has just enough strength to support the fruit. By shaking the branch the mass of the fruit experiences a small acceleration because its velocity before shaking was zero and then has a non zero velocity during shaking. Because the mass of the fruit is accelerated this means a force has been applied to it. During upwards acceleration the stem must exert an upwards force on the fruit as well as support its weight. If this combined force exceeds the force needed to snap the stem the fruit falls. This is an example of Newtons 1st Law.
When we shake a branch of atree he fruit are at rest but the branch gets moved this is the property of INERTIA and also as kinetic energy the immediate force acts on the fruit and it falls down