It also stems from the days when food was far less plentiful in Scotland and nothing could be wasted, except by the rich and extravagant.
This custom has its roots in the past when food was hard to come by in Scotland and every morsel was valuable, with only the affluent able to indulge in waste.