Genesis 3:8-9

And they heard the sound of the Lord God walking in the garden in the cool of the day, and Adam and his wife hid themselves from the presence of the Lord God among the trees of the garden. Then the Lord God called to Adam and said to him, “Where are you?”
— Genesis 3:8-9, NKJV

When they heard the sound of God strolling in the garden in the evening breeze, the Man and his Wife hid in the trees of the garden, hid from God. God called to the Man: Where are you? — Adam! Where Are You? If God is all-knowing, why did God ask Adam where he was and whether he had eaten fruit?