I suppose it depends what kind of explanation you are looking for. I'll try two ideas.
Compatibilism: Mental events such as conscious choices could be partly predetermined (ie made less or more likely) by prior mental events, beliefs, memory, education, etc. They are therefore causal. But this doesn't make them fully predetermined, nor does it make them unfree. To call upon memory, or to forget, to believe or not, or to reasses one's beliefs, is still and always the work of the mind (or the will if you prefer). Partial mental predetermination may offer a causal explanation for a certain train of thoughts or for a certain decision, but the decision was still freely made in the sense that only considerations within one's mental space influenced the decision, and the person was not too severely stressed or constrained in the type of considerations to make (no gun on her head).
At a very basic, Darwinian level, one explanation is that life developed the capacity to move around: locomotion, most importantly in the animal kingdom. This is a very useful capacity to the extent that you know where you're going.
If an animal had no clue whether to move in this or that direction, it might as well not move at all. And thus it should come as no surprise that locomotion developed over the eons concomitantly with senses and brain capacity to analyse sense data.
There needed to be a pilot in the plane.
To know where one is going is a surprisingly complex task. The animal perceives signals that are extremely complex and needs to interpret them correctly, integrating those signals in a sort of map of its environment, constantly updated. Such a simulation or model of the space around the animal, evidently rudimentary during the first evolutionary steps, was progressively refined over millions of years of evolution, giving animals a certain intelligence of the situation they are in. This "map" is necessarily a mental map, since it needs to be updated frequently. It would be where our innate capacity for geometry comes from.
The argument is that we, Homo sapiens and our "free will", are one of the results of this evolutionary trend. More precisely, I see us as an intelligence singularity produced by evolution: similar to a blackhole in astrophysics, but with intelligence instead of mass.