You are mistaken, read 2Chron 18v1-27...
Also, each individual Christian when standing before the Lord Jesus at His Second Coming, being judged, will have to give an account of themselves...
This part, I believe is the justification of what is recorded in Romans, Chapter 14, vs. 11)
For it is written, As I live, saith the Lord, every knee shall bow to me, and every tongue shall confess to God.
With regards to your question of why God asked satan to explain what he had been up to, it may well be based on the same concept of confessing to God his actions. Yes God knew what satan had been up to, just as He knows all we have ever said, did, or thought, but to fulfill Scripture and to be certain that all are required to take responsibility for their thoughts, words and deeds, it is necessary for them to confess to God those thoughts, words and deeds.
He knows all! And He will require all to confess all that has not been forgiven! I believe what He has forgiven will not be required of us to confess. That reminding of our sinful past is a trick of the devil, not God. What He has forgiven, He has forgotten, NEVER to be remembered no more.