Free choice lies at G-d's essence, for He alone is a truly free agent.
From His essence, He breathes into Man's nostrils and Man too becomes free to choose his destiny. And in that choice lies the Essence.
The darkness, the confusion, the possibility of evil then has a purpose of its own--and that is to be the stage to Man's free choice, to allow G-d's essence to enter.
And if a person would choose evil? Would G-d's essence then be revealed?
No. For just as light needs a darkness in which to shine, so darkness needs light to reveal it’s true purpose. Only when the choice is to do good, then light comes and reveals the essential truth of the darkness.