It is just that: "to simplify the map". Or more precise one of the examples of the German mediatization.
But with the small twist that the prime arbiter of this was Napoleon. He acquired German lands left of the Rhine for France. That was of course not very popular with German princes that lost possessions there. But then this was also painted as a modernisation: Napoleon championing secularisation in general.
That means that clerical estates were dissolved, and the lands 'liberated' from churchly rule were given to princes who lost territory left of the Rhine. This resulted often in quite some gains for most and did simplify the map considerably. Loosing far away lands but adding territory next to one's own base was seen as 'nice'. Therefore all those states left after this process were very enthusiastic of these changes, and became supporters of Napoleon from that alone, among other reasons, and at least for a while for some, and even into those times of hardship for Napoleon when military fortune had left him. Of course, those clerical 'princes' were not enthusiastic of loosing sovereignty and they were joined by all those smallish fiefdoms, counties and whatnots that lost in this game of lands. Even small secular sovereignties were 'secularised' that is joined by force into other territorial organisations. But the bigger players emphasised order and tradition on the one side, and paid France (or individuals) large sums of money to get results in their favour.
Istein and Schliengen were both part of the Prince-Bishopric of Basel and therefore up for grabs. Napoleon exerted force upon the Prince of Baden to act in that manner and the Reichsdeputationshauptschluss formalised and finalised the results.
All these colourful territories were used to compensate individual princes for left-rhenish losses and for pro-napoleonic behaviour in general:
When war broke out between the French First Republic and the Habsburg Monarchy in 1792, the Margraviate of Baden fought for the House of Habsburg. However, their country was devastated as a result, and in 1796 the Margrave was compelled to pay an indemnity and to cede his territories on the left bank of the Rhine to the French First Republic.
Fortune, however, soon turned his way. With the German Mediatisation of 1803, and largely owing to the good offices of Alexander I of Russia, Charles Frederick received the Bishopric of Constance, part of the Electorate of the Palatinate, and other smaller districts, together with the prestige of being named a Prince-elector. In 1805 he changed sides and fought for Napoleon. As a result, later in 1805, when the Peace of Pressburg occurred, he obtained Breisgau and other territories at the expense of the Austrian Empire (see Further Austria). In 1806, the Electorate of Baden signed the Rheinbundakte, joining the Confederation of the Rhine. Upon the dissolution of the Holy Roman Empire, Charles Frederick declared sovereignty and thus created the Grand Duchy of Baden, receiving other territorial additions as well.
WP: Electorate of Baden
While a 'map simplification' is a useful way to describe the process, it was not done from a neutral standpoint and not with total disregard for established borders and tradition. The prime driving force in this were the geo-strategic interests of France and the power grabbing wants of bigger and medium states within the German empire. Schaffhausen for example was part of the old Helvetian confederacy, just a little strip of land connected to the rest of that entity, not clerical, and almost consequently not much changed by the processes Napoleon kicked off.
The map in that area was greatly simplified. If you compare three maps from before (1789), during (1808) and after (1815):
From a fairly far away bird's eye, there are virtually no exclaves in that territory. Time for a closer look (1771 vs 1846 (map section) vs 1944)?
After Napoleon rushed through, there were hardly any enclaves or exclaves left in what is now France, Switzerland and Baden-Württemberg. 'Naturally' no border solution is ever perfect. But in that corner of the empire it went from 'totally messy' to 'a few anomalies'.