I'll try to apply your example, with a really terrible analogy (you have been warned).
You need more than just StudentID's, let's say you have StudentID and Major. So your would have to have something in common for it to be efficient. If you didn't, you would have really terrible performance, this is one of the many reasons proper subnetting is a good idea, For example:
- Jimmy - StudentID: 52440001, Major: Computer Science
- Johnny -
StudentID: 52440010, Major: Pre-Medicine
- Susan - StudentID: 52440935,
Major: Computer Science
- Carol - StudentID: 52440553, Major:
Now let's take it a bit further, what happens if you have a job fair and these students have no idea where to go so you say "Group (subnet ID) 52440000, this represents all students with StudentID's between 52440001 - 52449999 (IP addresses), go to the Computer Science Building (the next destination)".
Really simple right? It is until Johnny and Carol show up at the Computer Science building, what do a Pre-Medicine and Pharmacology major care about Computer Science? They don't, so now someone else has to "route" them, to get to their buildings. This is bad in networks, because there is no guarantee that Johnny and Carol don't have to go back the same way they came to get to where they need to go. So now Jimmy and Susan are where they need to be, but now Johnny and Carol are late for class and can't get a seat so they just go back to their dorms.
So how do we solve this? We plan. Now, what happens if the college starts saying, "Okay, all students in Major X, will be in Group Y. Now when we say "Group 52440000, go to Computer Science." or "Group 50010000, go to Pre-Medicine." This everyone ends up with a better experience, than the previous example.
So in short, you need to plan your IP space accordingly. Ideally you're not going to just shotgun IP's all over the network, you should group IP ranges to the same use cases, regions, destinations, whatever your network calls for - how you group them really depends on the environment.
(I told you it was terrible, if its not clear please let me know and I will happily edit my answer)