مَا تَعْبُدُونَ مِن دُونِهِۦٓ إِلَّآ أَسْمَآءًۭ سَمَّيْتُمُوهَآ أَنتُمْ وَءَابَآؤُكُم مَّآ أَنزَلَ ٱللَّهُ بِهَا مِن سُلْطَٰنٍ ۚ إِنِ ٱلْحُكْمُ إِلَّا لِلَّهِ ۚ أَمَرَ أَلَّا تَعْبُدُوٓا۟ إِلَّآ إِيَّاهُ ۚ ذَٰلِكَ ٱلدِّينُ ٱلْقَيِّمُ وَلَٰكِنَّ أَكْثَرَ ٱلنَّاسِ لَا يَعْلَمُونَ٤٠
You worship none besides Him except names that you and your forefathers have made up, for which Allah has not sent down any authority. The decision belongs to Allah alone; He has commanded that you should worship none except Him. This is the right religion, but most people do not know.”
[ ↗ Study from physical print edition ]You worship not besides Him except [mere] names you have named them, you and your fathers, for which Allah has sent down no authority. Legislation is not but for Allah. He has commanded that you worship not except Him. That is the correct religion, but most of the people do not know.
[ ↗ Study from physical print edition ]40. Joseph told them that they only worshipped names besides Allah, which have not been designated by Allah, but were what they and their ancestors had called gods – yet they had no share in divinity. Allah had sent no proof showing that giving these names was correct. The command in all creation is Allah’s alone, and does not belong to these names, which they and their ancestors had come up with. Allah, glory be to Him, has instructed that you worship Him alone, and has forbidden that you should associate others with Him. Worshipping Allah alone is the straight path, which has no deviation in it. Most people do not know this, and therefore they associate other things with Allah, worshipping some of what Allah has created.
You do not worship apart from Him that is other than Him anything but mere names that you have named that you have named for idols you and your fathers. God has not revealed any warrant any definitive argument or proof regarding them regarding worship of them. Judgement decree belongs only to God alone. He has commanded that you worship none but Him. That affirmation of God’s Oneness is the upright the straight religion but most people — and these are the disbelievers — do not know the punishment in which they shall end up and so they ascribe partners to God.
After that, he declares his abhorrence for disbelief and his disengagement from the community of disbelievers. Then, with it, he also stresses that he is a member of the House of Prophets and it is their Community that he adheres to and that he is a scion of the House of Ibrahim, Ishaq and Ya` qub (علیہم السلام) . We mentioned confidence a little earlier. Customarily, this kind of inherited nobility, a common family trait, is also a source of creating confidence in a person. After that he said: And it is not for us that we associate any partners with Allah. Then, he said that the Taufiq of following a true religion ('the favour of Allah upon us and upon all people' ) was nothing but the Fadl or grace of Allah Ta’ ala, for it was He who, by giving proper understanding, made the acceptance of truth easy on us. But, most of the people do not appreciate this blessing and do not show their gratitude for it. After having said that, he asked the same prisoners to tell him if it was better that human beings should be worshiping many gods, or was it better that one becomes a servant of one Allah alone - whose subduing power is all-dominant. Then he referred to idol worship from a different angle. He told them that their fathers and forefathers have taken some idols as their Lord. As for them, they are no more than a lot of names which they have coined on their own. They have no personal attributes which could become deserving of assigning to them the least fund of power - because all of them are inert. This is something one can see with one's own eyes. The only other method through which they could have been taken as true objects of worship would be that Allah Ta’ ala sends down specific injunctions or commandments to worship them. So, in that case, even if observation and reason had not been willing to accept their godhood but, because of the Divine command, we would have left our observation and reason aside and would have obeyed the command of Allah. But, this is not there either - because Allah Ta ala did not send down any argument or proof for their worship. Instead of that, what He said was but that Law and Sovereignty belonged to Allah Ta ala with no one having a right in it; and the command He gave was no other but that we should not worship anyone or anything other than Allah. Finally, he said: ` This is the only right path - which was bestowed on my forefathers by Allah Ta ala, but most of the people do not know this reality.'
Tafsir al-Qurtubi [The Compendium of Legal Rulings]
تفسير القرطبي (الجامع لأحكام القرآن)قَوْلُهُ تَعَالَى: ﴿يَا صاحِبَيِ السِّجْنِ﴾ أَيْ يَا سَاكِنَيِ السِّجْنِ، وَذَكَرَ الصُّحْبَةَ لِطُولِ مَقَامِهِمَا فِيهِ، كقولك: أصحاب الجنة، وأصحاب النار. (أَأَرْبابٌ مُتَفَرِّقُونَ) أَيْ فِي الصِّغَرِ وَالْكِبْرِ وَالتَّوَسُّطِ، أَوْ مُتَفَرِّقُونَ فِي الْعَدَدِ. (خَيْرٌ أَمِ اللَّهُ الْواحِدُ الْقَهَّارُ) وَقِيلَ: الْخِطَابُ لَهُمَا وَلِأَهْلِ السِّجْنِ، وَكَانَ بَيْنَ أَيْدِيهِمْ أَصْنَامٌ يَعْبُدُونَهَا مِنْ دُونِ اللَّهِ تَعَالَى، فَقَالَ ذَلِكَ إِلْزَامًا لِلْحُجَّةِ، أَيْ آلِهَةٌ شَتَّى لَا تَضُرُّ وَلَا تَنْفَعُ. "خَيْرٌ أَمِ اللَّهُ الْواحِدُ الْقَهَّارُ" الَّذِي قَهَرَ كُلَّ شي. نظيره: ﴿آللَّهُ خَيْرٌ أَمَّا يُشْرِكُونَ﴾[[راجع ج ١٣ ص ٢١٩.]] [النمل: ٥٩]. وَقِيلَ: أَشَارَ بِالتَّفَرُّقِ إِلَى أَنَّهُ لَوْ تَعَدَّدَ الْإِلَهُ لَتَفَرَّقُوا فِي الْإِرَادَةِ وَلَعَلَا بَعْضُهُمْ عَلَى بَعْضٍ، وَبَيَّنَ أَنَّهَا إِذَا تَفَرَّقَتْ لَمْ تَكُنْ آلِهَةٌ. قَوْلُهُ تَعَالَى: ﴿مَا تَعْبُدُونَ مِنْ دُونِهِ إِلَّا أَسْماءً﴾ بَيَّنَ عَجْزَ الْأَصْنَامِ وَضَعْفَهَا فَقَالَ: "مَا تَعْبُدُونَ مِنْ دُونِهِ" أَيْ مِنْ دُونِ اللَّهِ إِلَّا ذَوَاتِ أَسْمَاءٍ لَا مَعَانِيَ لَهَا. (سَمَّيْتُمُوها) مِنْ تِلْقَاءِ أَنْفُسِكُمْ. وَقِيلَ: عَنَى بِالْأَسْمَاءِ الْمُسَمَّيَاتِ، أَيْ مَا تَعْبُدُونَ إِلَّا أَصْنَامًا لَيْسَ لها من الإلهية شي إِلَّا الِاسْمُ، لِأَنَّهَا جَمَادَاتٌ. وَقَالَ: "مَا تَعْبُدُونَ" وَقَدِ ابْتَدَأَ بِخِطَابِ الِاثْنَيْنِ، لِأَنَّهُ قَصَدَ جَمِيعَ مَنْ هُوَ عَلَى مِثْلِ حَالِهِمَا مِنَ الشِّرْكِ. (إِلَّا أَسْماءً سَمَّيْتُمُوها أَنْتُمْ وَآباؤُكُمْ) فَحَذَفَ، الْمَفْعُولَ الثَّانِيَ لِلدَّلَالَةِ، وَالْمَعْنَى: سَمَّيْتُمُوهَا آلِهَةً مِنْ عِنْدِ أَنْفُسِكُمْ. (مَا أَنْزَلَ اللَّهُ) ذَلِكَ فِي كِتَابٍ. قَالَ سَعِيدُ بْنُ جُبَيْرٍ: (مِنْ سُلْطانٍ) أَيْ مِنْ حُجَّةٍ. (إِنِ الْحُكْمُ إِلَّا لِلَّهِ) الَّذِي هُوَ خَالِقُ الْكُلِّ. (أَمَرَ أَلَّا تَعْبُدُوا إِلَّا إِيَّاهُ). (ذلِكَ الدِّينُ الْقَيِّمُ). أَيِ الْقَوِيمُ. (وَلكِنَّ أَكْثَرَ النَّاسِ لا يَعْلَمُونَ)