For me, it's not about whether there are other children in the class with the same name. That may or may not happen, regardless of popularity.
It's about avoiding names which will inevitably sound 'dated', simply because they're so popular they become associated with an era
Names like Jennifer, Karen, Nicole, Dave, Brian, Kevin, etc - were all popular once, and now sound very dated. At the time, I'm sure the parents thought they were 'lovely' names!
Hard to believe that the names that are so popular now - Ruby, Olivia, Amelia, Isla, Millie, Tilly, Jack, Oliver, Harry, Charlie, Archie, Alfie, etc - will all sound very dated in 20 years.
There are so many names to choose from - it's understandable that many people do try to avoid the very popular ones.