Adding Slab to a Capacitor
As the slab is brought to the plates, it will experience an attractive force that will tend to pull it into the gap.  If you do not restrict it, the slab will accelerate.  

In an ideal environment, the energy loss in the capacitor will be balanced by the increase in kinetic energy of the slab.  Over time, this energy will be lost to friction or drag.  

Once the slab is at rest inside the plates, work must be done to remove it against the electric field.  This work will raise the energy stored in the capacitor.