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.
Anyone who says we don’t have free will can come up with a thousand reasons we don’t.
Anyone who says we do have free will can come up with a thousand reasons we do.
It really doesn’t matter. All I know is that if I wanted to go on a murderous rampage, I could. I choose not to. For me, that means that I currently have control over myself and my actions. And on the same token, there is so much outside of my control that affects my trajectory in this life.
So there are illusions if you allow there to be. To me, we both have and don’t have free will depending on context.
I call this phenomenon, Schrödinger’s Destiny.