I was looking at google maps today and noticed that Uzbekistan has several exclaves in Kyrgyzstan. Furthermore the border seems to be really oddly defined, it doesn't follow any natural borders as far as I can see.
From what I've been reading it looks like most of the exclaves are in valleys of the mountainous Batken Region of Kyrgyzstan where Tajikistan, Uzbekistan and Kyrgyzstan meet. The weird borders were apparently drawn by the Soviets a very long time ago. For example one of the exclaves is an Uzbek city called Sokh, which has a population of 50,000, 99% of which are ethnic Tajiks. Much of the land around the city was given to Kyrgyzstan by the Soviets in 1955, for no reason specified. Perhaps crossing borders within the Soviet Union wasn't that big a deal? Still weird that they didn't take care of this problem when the Soviet Union dissolved, because there has been a lot of border disputes between the three countries and border security is apparently tight.
Maybe a Russian redditor can look into Soviet history and find out.