Either our minds are illusory, or they serve some function.
If they are illusory, they are useless – unnecessary.
If they serve some function, then they can affect the functioning or physical states of our brains.
If our thoughts can affect our brains/minds, they can affect them by our decision, or else they are unnecessary.
If they are necessary, it is only by being able to affect our behaviour.
If they can affect our behaviour by optimizing it, our minds can only optimize our behaviour by changine it selectively.
If our minds cannot alter our behaviour from a purely unthinking deterministic path towards a more optimal behaviour, they are unnecessary.
We would not have our minds unless they were necessary, for they increase the organisms vulnerability by increasing resource needs.
If we have minds, it is only because they benefit our functioning and increase survival fitness, it is only because they are necessary.