Detailed Instructions: Given a travel related situation, and given a specific question about the situation, summarize the question into a title
Problem:In the last four days I've driven my motorbike from Milano to Kalamata going through a few nations on the east side of Adriatic sea, and in a couple of occasions I found myself crossing two customs to enter or exit a country (in both cases it was night, and cold, and I was freezing, and after driving for hours and hours, so I did not take note of which border...but probably entering Montenegro and exiting Albania)

Why is that? I noticed that in all occasions one custom asked for both my passport and my bike documents and the other custom asked for just my passport, but still it doesn't make much sense.

Solution:
Why two customs/immigration controls?