New data structure

Could you explain what is happening here? It looks like we are only defining the id if the id doesn't exist in the routing table, but we would need a defined id to do that. I'm sure I'm missing something.