I've known this phrase to mean roughly "Using ideas which are bad". The Collin's definition seems to be "to be forced to use one's last and weakest resource". I've seen claims that it refers to American food storage in times of need, but not found any references for this or tracked down any more specifics. For example, Wiktionary could not find the origin:
Derived from the historical practice in the early United States of storing food in barrels; when food supplies ran low, only what was on the very bottom of the barrel remained, and had to be removed by scraping.(Can this etymology be sourced?)