God had the freedom to do lots of different things. God chose to create a particular world with concrete rules. Gravity works because it is grafted into the creation. Atoms make molecules because that is the working plan.
I am daily confronted with all sorts of things which make people say, "Why would God do that?" Everyone has a list of such things. If we take seriously that the world is running along as designed then we know that things happen because there are causes and connections. When my son hits a baseball there is a matter of physics involved. The construction of ball and bat, the speed and location of each, the wind all combine to determine if it is a home run, a weak ground out or a foul ball. God does not sit and decide where to make the ball go. That is a mathematically determined outcome. Now my son and the pitcher operate in God's world. They are co-creators of the event based on their skills, choices and execution. Most of life is like that. Where does God come in? In the hearts of each player, that is where the most important events take place.