The Lottery is written in vague terms, with a nondescript setting in some American village in some modern time period (or so every hint is telling). Each line is put together to force the reader to "read between the lines" to orient his- or herself.
The sentence about Bobby, Harry, and Dickie functions on several levels. First, it tells us this is a small village; after all, the villagers all knew to pronounce Dickie's last name the right way. Second, it tells us that these boys are like any other boys in any other village - playing together in a small group, guarding their treasure from other boys. This reinforces the eerie sense of normalcy about the whole scene.
The Lottery is brilliant at portraying the setting, the events, and the people as nothing more than ordinary folks, and does so in few words. Their participation in this ritual is expected, and each person knows his or her role, and there is nothing unusual about it because that is how it has been done for generations, as long as anyone can remember.
The third thing this sentence accomplishes is creating a strong emotion: excitement. The lottery was an exciting event, at least for the boys. Something was about to take place, and there is a sense of palpable enjoyment.
Fourth, this sentence makes certain there is no judgment of the boys - there is no right or wrong as to what they are doing. They are simply stockpiling, presumably for good reason. They are preparing themselves and there is no hint anyone will stop them.
This sentence is one of many that perform a very specific function within the story. Later, the villagers will use this pile of stones, so they don't run out, to fulfill the title—they will stone to death the one who was chosen in the lottery.