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.
Our brains cannot store all the experiences we ever make. It rather only stores ‘hunches’ (via many weightings of neurons). In particular, it also mixes multiple experiences together to reinforce such hunches.
This means that despite there being causal reasons why you might e.g. feel uneasy around big dogs, your brain will likely only reproduce a hunch, a gut feeling of fear.
And then because you don’t remember the concrete causal reasons, it feels like a decision to follow your hunch to get the hell out of there.
This feeling of making a decision is made even stronger, because there isn’t just the big-dog-bad-hunch, but also the don’t-show-fear-to-big-dog-hunch and the I’m-in-a-social-situation-and-it-would-be-rude-to-leave-hunch and many others.
There is just an insane amount of past experiences and present sensory input, which makes it impossible to trace back why you would decide a certain way. This gives the illusion of there being no reasons, of free will.