Chastising the People of the Scriptures for Breaking the Covenant and Hiding the Truth
In this Ayah, Allah chastises the People of the Scriptures, from whom Allah took the covenant by the words of their Prophets, that they would believe in Muhammad ﷺ and describe him to the people, so that they would recognize and follow him when Allah sent him. However, they hid this truth and preferred the the small amounts and the material gains instead of the rewards of this life and the Hereafter that they were promised. This is a losing deal and a failing trade, indeed.
These Ayat also contain a warning for the scholars not to imitate their behavior, so that they do not suffer the same fate and become like them. Therefore, the scholars are required to spread the beneficial knowledge that they have, encouraging the various righteous good deeds. They are also warned against hiding any part of their knowledge. A Hadith states that the Prophet said,
In continuation of the description of evils practiced by the Jews mentioned in previous verses, the first of the present two verses (187, 188) takes up yet another evil practice of theirs. This is their habit of going back on solemn pledges and covenants - for Allah Almighty had taken pledge from the people of the Book that they would communicate the commandments of Allah appearing in the Torah freely, openly and universally and that they would not conceal any injunction out of their selfish ends. The people of the Book broke this covenant. They concealed injunctions. Not only that, they were audacious enough to show their pleasure about having acted in this manner and taking this deed of theirs as commendable.
When a decline sets in in the bearers of a revealed Book, it in no way means that they have entirely severed their bond with God or His messenger. This is not possible, because religion becomes a part of the traditions of a community. It becomes a great national asset and a matter of tremendous pride. And once such a communal and national link is established with something, disassociation from it is just not possible for any group. However, this association with traditions in the name of religion is purely formal and lacks in genuine religiosity, for all worldly activities continue to be engaged in in the name of religion. Even when members of certain societies have nothing to do with religion, they want to be called religious. They want to take credit for things they have not done. Having no real concern for eternal salvation, they develop such concepts as appear to show that their salvation is certain. They follow a self-made religion, but call themselves upholders of divine religion. They are busy in activities serving worldly ends, but call these activities Hereafter-oriented. They call their self-styled politics divinely guided politics, declaring that they have been moved to action for the betterment of the ummah (community), whereas, in reality they do little more than serve their own national interests. One cannot save oneself from the chastisement of God by giving one’s irreligiousness the name of religion. When man remains engrossed in worldly pursuits, oblivious of matters which are important in view of the Hereafter, he is going astray, but when he engages himself in worldly pursuits in the name of God, or the Prophet, he is adding insult to injury, because he wants to be given credit for a faith which is hollow and actions which are false.
Uthmani text of the Madinah mushaf (King Fahd Complex). Translation: Saheeh International. Tafsir via Quran.com.