As the noble verse explicitly states, its scope does not include every spouse and child; rather, it refers to some of them: those who obstruct a person’s obedience and worship, or in some way stand in the way of worship or hinder it.
Al-Taghābun 64:14: یا أیها الذین آمنوا إن من أزواجکم و أولادکم عدوا لکم فاحذروهم و إن تعفوا و تصفحوا و تغفروا فإن الله غفور رحیم
“O you who believe, among your spouses and children are some who are your enemies, so beware of them. But if you pardon, forbear, and forgive, then surely God is All-Forgiving, Most Merciful.”
عن أبی جعفر علیه السلام إن من أزواجکم و أولادکم عدوا لکم فاحذروهم و ذلک أن الرجل کان إذا أراد الهجره إلى رسول الله صلى الله علیه و آله تعلق به ابنه و امرأته، و قالوا: ننشدک الله أن تذهب عنا و تدعنا فنضیع بعدک، فمنهم من یطیع أهله فیقیم، فحذرهم الله أبناءهم و نساءهم و نهاهم عن طاعتهم، و منهم من یمضی و یذرهم، و یقول الله: أما و الله لئن لم تهاجروا معی لم یجمع الله بینی و بینکم فی دار الهجره لا أنفعکم بشیء أبدا، فلما جمع الله بینه و بینهم أمره الله أن یحسن إلیهم و یصلهم، فقال: و إن تعفوا و تصفحوا و تغفروا فإن الله غفور رحیم.
Tafsīr Nūr al-Thaqalayn, vol. 5, p. 342
Imam al-Bāqir (peace be upon him), in a narration transmitted by Abū al-Jārūd, related the following about the words of God Most High, إن من أزواجکم و أولادکم عدوا لکم فاحذروهم:
“When a man wished to emigrate to the Messenger of God (peace and blessings be upon him and his family), his wife and child would cling to him, saying, ‘We adjure you by God: do not leave us behind or abandon us. We will be left without anyone to care for us after you.’ Some men would heed their families and stay behind. God therefore warned them about their children and wives and forbade them to obey them. Others would go ahead and leave their families behind, saying, ‘Take care: by God, if you do not emigrate with me, and God then brings us together on the Day of Resurrection, I will not be able to benefit you in any way.’ When God brought them together, He commanded the man to treat them well, do good to them, and maintain his family ties. Thus He says: و إن تعفوا و تصفحوا و تغفروا فإن الله غفور رحیم.”