I cannot remember the details, but I believe under various changes related to "deregulation" the railroads are in fact now obligated to sell any line up for abandonment for appraised fair market scrap value to any financially responsible party that can convince the STB that they will run the line for at least two years or so.
But of course this was not the case in the old days of the ICC. In the old days railroads did not want to sell branches for at least two reasons. One, most such sales would result in some kind of shortline operation, and under the old rate divisions theory, originating and terminating shortlines got disproportionately large shares of the total freight revenue, which in effect might result in the abandoning carrier subsidizing the resulting shortline. Secondly, the abandoning carrier sometimes valued the reusable material at higher than market value, because they would remove it with existing employees and transport it to where it was needed for "free".
JBWX