Yeah this wouldn't be a bug, but a new rule. There are many things one would hope it can do, but I want there to be as few rules as possible, because with each rule can come more unexpected exceptions.
This one... is absolute enough that it might be okay to add? Not sure about that, because for example you might have a nonfunctional part that has way more integrity than a functional version, and you don't really need the part's function but are using it as makeshift armor, in which case the autoreplacement would actually be bad for you. (That's just one example, there could be more.) In general if there's a chance for any change to have a negative impact, it's not included in the system, which always errs on the side of being something you can simply not even think about. You press 'a', and if it swaps some stuff then you know it was a good decision--only if it doesn't swap anything do you have to think about it.