Code that works but is unmaintainable is a burden on a project, that being said with open source, you can always fork the code, add your code, and let people decide
Doesn't change the fact that working code does have value. If your program didn't do something before and it does now, that absolutely has value.