coin selection – Testing `avoidpartialspends` option in Bitcoin Core

In this particular case, it is because Bitcoin Core prefers to make transactions which do not create change over anything else. Notice how this transaction does not have any change. If the Branch and Bound exact matching algorithm finds a solution, it is always used, regardless of other “optimality” as it considers “no change” to be an optimal solution.

Obviously this may not be actually be optimal, but there are planned changes to the way coin selection works to have different metrics for “optimal”.