Having planned and managed maintenance and renewals work, and done a stint on the shovel, I may be able to help here.
1) it is simply not the case that all works leave waste material behind. Far from it. A majority of jobs do clear up after ‘themselves’. But naturally, there is no evidence of that, as it’s all been taken away!
2) many materials left behind are done so deliberately - stretches of rail, sleepers, ballast bags, etc etc. This is so that when a short notice repair is required the team don’t have far to go to find materials. Some of this will be in situ for decades, and yes it may have weeds growing through it, but aside from looking a bit messy that’s by the by. Almost everything that looks ‘new’ left behind is done so deliberately.
3) heavy maintenance and renewals jobs will usually over order materials, and some will end up being left behind until it can be collected. Some people will say over ordering is ‘inefficiency’. I would say it is good planning. I’d rather end up with 10 bags of ballast too much than 10 too few at 0230 on a Monday morning.
4) collecting up scrap / waste etc from a job is always planned in. However sometimes the resources (plant, labour, access) are diverted for more urgent jobs, and it will need replanning. If it is not a threat to safety or performance it will be given the lowest priority, which is usually at least 6 months away, and preferably at a time when the access / resources are already in the area for similar work.