Our ancestors wanted to keep the society clean which is why they prohibited doing marriage in the same village. During our generation, the understanding was that the girl from your village was your sister and this is how she was treated. Marriage was unthinkable in the same village. The husband of the girl from your village was treated as Javaaee (son-in-law) by the whole village. If someone from outside teased a girl from the village, then the whole village used to stand up and fight.
There is no mention of this rule in Gurmat but this rule was good because it gave the feeling of family within the village and there was much less Kaam related dirt within the village. On the other hand, in Muslims, they are allowed to get married to even their first cousins which results in segregation of girls from boys even within the family.
Just like we follow the law of the country we live in, even if it's not mentioned in Gurmat, the same way such good rules of not getting married within your village should be followed. Some Sikhs from Rawalpindi background get married to their cousins. This is not right for the society and as thus should be avoided.
Guru Sahib knows better.
Kulbir Singh