bitcoin-core automatic coin selection for business reason i need to use the bitcoin-core (v0.20.1) automatic coin selection feature and few days ago i saw a transaction come out that left me puzzled, it was like that:
input

  0.00017[...]  bc1qaddr1
  0.01292[...]  bc1qaddr2
  0.00030[...]  bc1qaddr3
  0.00020[...]  bc1qaddr4
  0.00015[...]  bc1qaddr5
  0.00035[...]  bc1qaddr6
  0.02371[...]  bc1qaddr7

output

  0.02783[...]  bc1qaddr8  &gt; amount sent
  0.00965[...]  bc1qaddr9  &gt; change

in this transaction 5 out of 7 utxos are unnecessary, is there some benefit in chaining toghether utxos in this way?from my point of view this is a terrible way of loosing privacy and pay way more fee than needed, what i miss?i read that bitcoin-core tries to find an exact match from available utxos and the amount to send, but if it fails then try to find a subset of utxos to reach a change of 0.01btc, is that right?so, in my case, the unneeded utxos are added to get the change of my trasaction closer to 0.01?
This occurs because Bitcoin Core's coin selection algorithm tries to have a minimum change of 0.01 BTC. Fees are subtracted from the change output so the result is that the change output has a lower value, but before fees, it will try to for the change output to be at least 0.01 BTC.
As we can see in your transaction, the change before fees is approximately 0.01 BTC. Presumably it is actually over that because you have obfuscated the last several digits. Then the transaction fee was subtracted from the change output to get the final change output value that you have.

The reason that there is a minimum change is so to avoid creating very small change outputs. Small change outputs can be detrimental to the user's wallet and to the network as a whole. Those small change outputs result in the wallet having more UTXOs, which means that for future transactions, require more UTXOs to spend. Furthermore, small values can quickly become uneconomical outputs when the feerate rises. If lots of small change outputs were being created, a wallet could end up having a significant portion of its UTXOs be unspendable when fees are high.
Additionally, by having a minimum change target, the coin selection algorithm will tend to consolidate and sweep up smaller UTXOs. This behavior is, in general, good for the wallet and good for the network. It reduces the number of UTXOs globally, reduces the number of UTXOs that the wallet needs to handle and keep track of, and makes it less likely that UTXOs in the wallet will become uneconomical in high fee events.

In general, coin selection is a hard problem which needs to balance several factors. It is not just what the fees are for the transaction right now, nor is it necessarily just about the user of the wallet in that moment. Coin selection needs to consider the cost of spending outputs in the future and how its behavior will effect the selection of UTXOs in a future transaction. Coin selection needs to balance the health of the network and the performance of the user's wallet.