Wa Salamun alaikum!
Dear brother Asif,
The Israelites had just been liberated from the travails and torture of a most heinously oppressive slavery. Then, they were still a people under training. Allah, in His infinite mercy, takes into account human limitations.
A few examples:
16:106 Anyone who utters unbelief, after attaining faith in God, except under compulsion, his heart remaining firm in faith, is different from the one who is fully content with disbelief. The latter group invites God’s requital, and theirs is an awful doom. [See 6:145, 14:8. The Divine wisdom decrees that if someone is bent upon killing a Muslim unless he denies God, he may do so to save his life. The subject is restricted to uttering belief/disbelief in God, and involves unduly risking one's life]
16:115 He only prohibits for you the dead animal, blood, and swine-flesh and anything that has been dedicated to other than God. In a forced situation, provided one doesn't exceed the necessity, remember that God is Forgiving, Merciful. [6:145]
Keep the Israelites' condition in mind.
65:7 ..... God puts no burden on any person beyond what He has given him/her. (He does not hold accountable any human being with more than what He has given him.) ....