These ayas of sura maidah are regarding hypocrites munafiqs
يٰۤـاَيُّهَا الَّذِيۡنَ اٰمَنُوۡا لَا تَتَّخِذُوا الۡيَهُوۡدَ وَالنَّصٰرٰۤى اَوۡلِيَآءَ ۘ بَعۡضُهُمۡ اَوۡلِيَآءُ بَعۡضٍؕ وَمَنۡ يَّتَوَلَّهُمۡ مِّنۡكُمۡ فَاِنَّهٗ مِنۡهُمۡؕ اِنَّ اللّٰهَ لَا يَهۡدِى الۡقَوۡمَ الظّٰلِمِيۡنَ
(5:51) Believers! Do not take the Jews and the Christians for your allies. They are the allies of each other. And among you he who takes them for allies, shall be regarded as one of them. Allah does not guide the wrong-doers.
فَتَـرَى الَّذِيۡنَ فِىۡ قُلُوۡبِهِمۡ مَّرَضٌ يُّسَارِعُوۡنَ فِيۡهِمۡ يَقُوۡلُوۡنَ نَخۡشٰٓى اَنۡ تُصِيۡبَـنَا دَآئِرَةٌ ؕ فَعَسَى اللّٰهُ اَنۡ يَّاۡتِىَ بِالۡفَتۡحِ اَوۡ اَمۡرٍ مِّنۡ عِنۡدِهٖ فَيُصۡبِحُوۡا عَلٰى مَاۤ اَسَرُّوۡا فِىۡۤ اَنۡفُسِهِمۡ نٰدِمِيۡنَ ؕ
(5:52) Indeed you see those afflicted with the disease of hypocrisy race towards them, saying: 'We fear lest some misfortune overtakes us.84 And it may happen that Allah will either bring you a decisive victory or bring about something else from Himself?85 and then they will feel remorseful at their hypocrisy which they have kept concealed in their breasts -
84. The outcome of the conflict in Arabia between Islam and unbelief (kufr) had not crystallized. Although Islam had become a formidable force owing to the daring, courage and sacrifices of its followers, the forces opposed to it were also tremendously powerful. To an objective observer it must have seemed that either party had an equal chance of success, and so the hypocrites, apparently an integral part of the Muslim body politic, sought to maintain good relations with the Jews and the. Christians as well. They expected refuge and protection from the Jews in case Islam was defeated. Moreover, the Jews and Christians held the greatest economic power in Arabia insofar as the banking system and the greenest and most fertile regions of Arabia were in their possession. For these reasons the hypocrites were keen to maintain good relations with them: they thought that to regard the conflict between Islam and unbelief as crucially important, and to sever their relations with all those currently in conflict with Islam, would be too great a risk both politically and economically.
85. They were looking for a conclusive victory, or at least something not far short of it, to inspire confidence that the conflict would end in favour of Islam.
وَيَقُوۡلُ الَّذِيۡنَ اٰمَنُوۡۤا اَهٰٓؤُلَاۤءِ الَّذِيۡنَ اَقۡسَمُوۡا بِاللّٰهِ جَهۡدَ اَيۡمَانِهِمۡۙ اِنَّهُمۡ لَمَعَكُمۡ ؕ حَبِطَتۡ اَعۡمَالُهُمۡ فَاَصۡبَحُوۡا خٰسِرِيۡنَ
(5:53) while those who believe will exclaim: 'Are these the self-same people who solemnly swore by Allah that they were with you?' All their acts have gone to waste and now they are the losers.86
86. However much they might profess to follow Islam - by performing Prayers, by observing Fasts, by paying Zakah, by taking part in wars in the cause of God - all was reduced to naught because they had not devoted themselves to the service of the One True God. In pursuit of their worldly ambitions they had split their souls into two, distributing half to God and half to those in rebellion against Him.
Surah Al-Ma'idah 5:51-53
THE MESSAGE FOR US IS CLEAR IN THESE AYAS DON'T RELY ON OTHERS FOR PROTECTION HAVE FAITH AND STAND ON YOUR OWN FEET.