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.
But my body also takes actions which I don’t control and of which I’m not conscious. E.g., normal cell death and replacement (granted, I would eventually notice if this stopped, but not in the short term). I don’t have the illusion of control over those actions, but I do have a sense (real or not) of control over others. My question is, why do I have that sense if it’s not real?
The premiss involves the idea that it would feel different, that my deliberate acts would feel (like cell replacement) like a thing that happens, rather than a thing I’m doing. Granted, if I were unconscious of all my acts, it wouldn’t feel like anything (like my experience of x-rays, which is a non-experience), but then I would be unconscious. So, if I’m interpreting you correctly, are you suggesting that the sense of will is a property of consciousness, and that consciousness is itself an emergent property of sensory experience?