Hey @Sradha, this works fine. Yes the testNG suite will run and will generate no results as the group names are not matching to any of your groups. The XML file that you create has nothing to with your actual testNG class and the groups in it.
Once you have mentioned the group names in the testNG class those refer to the group you made for your convenience and if you don't run or change the groups name then the suite will look for those groups and if it doesn't find one then it will simply execute the suite file without generating any reports.
Hope this explanation was of some help.