When I was a poor starving student and worked in a supermarket the managers had to put all the expired cakes and cookies in the trash compactor to stop workers taking them. Not sure if this was so we would buy from the store instead or in case we sued if we got ill