that is because they said to those who hated what god has revealed we will obey you in certain matters. but god knows their secret thoughts.
ذلك بأنهم قالوا للذين كرهوا ما نزل الله سنطيعكم في بعض الأمر والله يعلم إسرارهم