Three possibilities come to mind:
Is there an evolutionary purpose?
Does it arise as a consequence of our mental activities, a sort of side effect of our thinking?
Is it given a priori (something we have to think in order to think at all)?
EDIT: Thanks for all the responses! Just one thing I saw come up a few times I’d like to address: a lot of people are asking ‘Why assume this?’ The answer is: it’s purely rhetorical! That said, I’m happy with a well thought-out ‘I dispute the premiss’ answer.
The people who are against the concept of free will say that because you have innate desires for food sex and entertainment, that you have no choice to not act upon those in a desires and therefore any delusion that you carry about the choices that you make being done of an entirely unencumbered and Free Will are false.
That’s not the argument against free will. The argument is just that there’s a physical process to every thought in your head. When you think of a tree, inside your brain a specific pattern of neurons and chemical messengers activate which is what creates the thought of a tree.
When you’re consciously deciding whether to eat a donut or a salad, a specific pattern of neurons and chemical messengers are the mechanism by which that decision process is occurring. The pattern of neurons and chemical messengers happening in your brain is the physical mechanism that is performing the decision making process.
There are no thoughts outside of the ones generated by your neurons and chemical messengers. The pattern of neurons and chemical messengers IS the thought that you’re thinking. Your brain (and the thoughts that occur within it) is a physical object that obeys the laws of nature, the same as all physical objects do.