(AFAIK it is pretty hard to come up with a system of law that doesn't start with this assumption without it being either completely ineffectual or very oppressive. Whether or not free will exists, it's at least a very handy abstraction for distinguishing good actors from bad ones.)
As far as I can tell, the law is based on a collection of ideas we collectively identify as "justice". In no particular order: that punishment can reform a person so they no longer commit criminal acts, that the threat of punishment can cause a person to refrain from committing criminal acts, and that punishment as revenge is just a good thing.
None of this has anything to do with "free will", whatever it is.
A computer comes to a fork in the road, x == 5 so it goes left, it does not have free will and cannot choose to go right, it always goes left if x == 5.
We can argue "but what about determinism" all day but I'm pretty sure you understand what we mean by "free will" and are just being pedantic.
As far as I can tell, there are three possibilities:
1. The entity has no internal state. Any stimulus always produces the same response.
2. The entity is deterministic and has internal state. The same stimulus does not necessarily produce the same response. The same stimulus combined with the same internal state will always produce the same response.
3. The entity has some random factor in how it works. The same stimulus does not necessarily produce the same response, even with the same internal state.
Which one is "free will"? It's definitely not 1. It doesn't seem to be 2, from how people talk about it. But neither does it seem to be 3, as it's discussed as something more than just randomness. But what else could there be?
A person performs an action, measures how the environment is changed, and modifies their behaviour to get better outcomes (for themselves or other people they care about).
Humans are a bit more sophisticated than a PID controller. While most animals, machines and nature itself are limited to blindly performing actions and measuring the result, people (and crows) can ponder what will happen IF they do something. Several steps ahead. They do not need to perform an action to anticipate the consequence.
When we say the law assumes free will, we mean that the law assumes a good control system. "If you do this we'll put you in a concrete box". The law assumes that threat will work.
This, as it turns out, is a flawed assumption. Many people do not think through their actions (stupid criminals), or they think through their actions and judge them worth the risk (e.g. weed smokers), or they have no other choice of action (e.g. prostitutes).
tl;dr: your rice cooker has free will.