God judges people for their behavior because God knows that they could have done something other than what they did, since people have free will to choose.....
It is for the same reason that courts of law judge human behavior.
If we had only determinism, we would be automatons. An automaton has a built in program, that makes it predictable. Natural instinct is similar to that, in that if we know the natural behavior of any animal species; its program, we also know what it will do in various situations, even before it acts. The Koala Bear will chose and climb a eucalyptus tree. His instinctive program has predefined logic steps and by knowing this and by watching and learning, you can see its logical future in given situations.
What free will does is allow one to make choices that deviate from the instinctive program. This distinction is why the Bible goes from paradise to a harsh reality via Adam and Eve. Paradise is connected to not having to plan or worry about the future, since you are preprogramed; by natural determinism, to do what it needed, when needed, as a natural human. This takes away a lot of potential pressure and worry due to having to make choices. One does not have to worry what to wear or eat or even say, today, if the program chooses for you. It is like Mother Nature caring for you, her little smiling baby.
The way humans are able to make choices, apart from their natural instinctive program or human nature; free will, is because the human brain evolved a secondary center of consciousness. Humans have two centers of consciousness. The inner self was first and is common to all animals has the natural program for the human animal that evolved over eons as part of God's natural creation and is written on our human DNA.
That is the litmus test of God's will and choice; natural automaton program. The ego or the newer secondary center is based on learned knowledge from outside; cultural and environmental. We have the internal natural program; innate, as well as external programs that the ego learns from culture and its own choices. These do not always match and can be a blends of choice and determinism.
As a good example, if you compare human babies and small children, from around the world, baby and child development is very similar independent of culture. They eat, cry and poop. They learn to stand and walk. They have a variety of cries for different needs and wants. They are very natural and have an active imagination. They learn language like a sponge. They may even have an imaginary friend, which is connected to an inner self projection. Although the imaginary friend is fine for a small child, in most cultures it becomes taboo or subject to shame after a certain age and needs to be repressed. The inner self and natural human instinct is also lost with childhood; repressed but not shut off. Unless you become as chidden; led by the inner self program, you cannot enter heaven or paradise.
As the developing childhood ego; secondary, learns from their family and external cultural world; school, what started out very similar and predictable becomes as different as night and day based on culture and circumstances. That new cultural determinism is based on cultural education, exercising will and choice to deviate from the natural program. A rebel may even buck cultural determinism; cultural superego, with will and other choices, such as from a different cultural super ego; change political party or move to a new country and culture.
In my experience, the various religions of the world are more concerned with the inner self, while secular culture works the ego. Jesus refers to the inner man and outer man as two opposing world views. The inner man is the internal innate natural program and the externally man is th ego and learned program. The internal man is seen as higher; enlightenment. The reason it is higher is the inner self uses the mainframe part of the brain since it connects consciousness to body. We have about 30 trillion cells in the human body with nerve endings near most of them. This massive data is processed constantly integrating mind, body with the sensory environment and internal ego and inner self thought processing of conscious and subliminal data.
Evolution is such that the next step appear to be for the ego to gain more access to the main frame; inner self. With that access comes more responsibility, which is what is taught by most religions. It blends the needs of the ego and inner self with the inner self first; inner man.