Explained in Detail - 41:21 "They will ask their skins, "Why did you testify against us?"They will say, "Allah, Who made all things speak, made us speak. It is He who first created you and to Him you are being returned."
in the context of verses 20, 21, 22, 23, ... they thought that Allah would not know most of what they did:
The Repentance/9:127 "Whenever a Surah descends, they stare, saying: "Does anyone see you?"Then they turn away. Allah has turned their hearts away because they are a people who do not understand."

The Pleading Woman/58:8 "Have you not noticed those who were forbidden to hold secret meetings but still persist in what they were forbidden? They are lobbying for the purpose of sinning, enmity and disobeying the Messenger. When they come to you, they greet you in a way that Allah does not greet you. They say among themselves, "Why should Allah punish us for what we say!"Hell is enough for them. There they will burn; what an evil abode is that."

The Women/4:108 They hide from the people, but they cannot hide from Allah. He is with them when they conceive thoughts that He dislikes. Allah encompasses all that they do.

The Ornaments of Gold/43:80 Or do they think that We do not hear their secrets and their plots? Indeed, Our messengers with them are recording.

The City/90:6 "He says (boastfully), "I have spent a lot of money."
The City/90:7 Does he think that no one sees him?

The Table Spread/5:52 "You will see those in whose hearts is a disease, wandering among them, saying: "We fear that some calamity may befall us. It may happen that Allah will bring victory or a command from His side, and they will regret what they have been concealing in their hearts."

The Family Of Imran/3:156 "Believers! Do not be like the disbelievers who say of their brothers who traveled or went to war, "Had they stayed with us, they would neither have died nor been killed". Allah makes this kind of thinking a source of sorrow in their hearts. It is Allah who gives life and Allah who kills. Allah sees what you do."

Prophet Hud/11:5 They want to conceal from Him what is in their breasts. Know well that He knows what they conceal and what they reveal, even when they put on their clothes. He is the Knower of secret thoughts.