This is a statement of permission from Allah, for His servants, allowing them to eat the slaughtered animals werein His Name was mentioned when slaughtering them. It is understood from it that He has not allowed that over which Allah's Name was not mentioned when slaughtering. This was the practice of the pagans of Quraysh who used to eat dead animals and eat what was slaughtered for the idols. Allah next encourages eating from the meat of sacrificed animals on which His Name was mentioned upon slaughtering,
(And why should you not eat of that on which Allah's Name has been mentioned, while He has explained to you what is forbidden to you...) meaning, He has explained and made clear to you what He has prohibited for you in detail,
(except under compulsion of necessity.) In which case, you are allowed to eat whatever you can find. Allah next mentions the ignorance of the idolators in their misguided ideas, such as eating dead animals and what was sacrificed while other than Allah's Name was mentioned when slaughtering them. Allah said,
(And surely, many do lead astray by their own desires through lack of knowledge. Certainly your Lord knows best the transgressors.) He has complete knowledge of their transgression, lies and inventions.