@Ashnee Sharma No one deleted the groups. Well digging further found this issue is different from deletion of the groups. Its something related with infra initial setup 🙂 Anyway accepting the answer as it can help with normal scenarios.
This error has nothing to do with the missing user-specific group. The NameNode has no requirement that the group name match the user name. As long as the id command succeeded and returned any groups the NameNode would not have logged the error.
This error was likely due to a temporary infrastructure issue as pointed out by @Smart Solutions in a later comment. The following article is a good starting point for any issues related to groups lookups.