Developers don’t want to delete code because it might be used down the road. Every project I work on these days gets a “graveyard” folder in the main source tree where people can put code they don’t need any more but don’t want to delete forever or lose track of in the repository history.
I find that this makes a HUGE difference in keeping the source files cleaner. Just having a place to put the code where you know you can find it later if you need it removes a lot of the hesitation in actually taking it out.
People will still comment out chunks of code for a while if they’re unsure that it can be safely removed, but eventually that code gets moved to the graveyard and taken out of the live codebase.