One of the things we do as fantasy writers when we get the crayons out and start drawing maps is to sketch in rough borders between countries. If you're anything like me, those borders will be largely aesthetic. It becomes an exercise in producing interesting shapes, rather than in political theory/history/economics. Now, I'm only really qualified to talk about the history aspect, but I do think countries generally have more to their shapes than that.
Here's a quick question, how do countries come into being? Obviously these days, there's a formal process of recognition, but in the past, things were generally quite complicated. Look at the formation of Germany or Italy in the nineteenth century. Look at the gradual creation of the UK from the post Roman period up to 1707 (formal joining of England and Scotland) and beyond.
So, where do they come from? Ideas play a part. One idea is that distinct ethnic groups ruling areas, and its replacement with broader administrative areas. In the middle ages, for example, we had a transition between Kings 'of the Franks' whose will generally didn't apply to the Normans, and Kings 'of France' whose will eventually did, at least in theory. Part of that was selling people on the idea of France as something real. The same can be said of Britain. The notion of 'Britian', as well as its flag, is actually a marketing ploy created by James I (and VI). When he started his reign in England after Elizabeth's death, he was not king of Britain. He was the king of Scotland, and he was, separately, the king of England. He strove to create a notion of shared national identity through symbolism. It didn't work quickly, or arguably well.
Warfare plays a part. Historians are generally wary of the notion that there 'has' to be a war to sort out major issues, or that these things sort anything out, but there very frequently are wars to build countries, for the not unreasonable reason that the rulers of separate little bits of land tend not to want to be swept up in other people's empire building. In many cases, medieval nations were the shapes they were because of the ease or otherwise of sticking an army there to remind the locals whose kingdom they were in. Borders were however far the warriors on the other side of them let you push them forward.
Which may explain why geographical features often end up not quite being the border. Things like major rivers and ranges of hills offer natural ways of hampering an advancing army, so they tend to get settled on as borders. Except that things are never quite that simple, because people push for a bit of extra land, and the other side push back, and then they make a treaty with a lot of complicated maps.
Which can lead to the concept of overlapping countries. Or disputed regions, if you want to think in today's terms. Except that it's not quite the same, because often you were talking about rather larger regions. And also bad mapmaking. And a lack of international oversight. With the result in the UK's case that Scotland would sometimes claim as far south as the Humber as its legitimate teritory, and try to impose its laws, while England would claim... well, most of Scotland, really. And the people in between often didn't see anything of their kings or their retainers for years on end and spent their time stealing from both sides and trying to live a quasi-independant existence.
What I'm saying is that countries aren't just pretty shapes on maps. They're all kinds of other things. They're symbols. They're attempts to define an identity. They're ongoing arguments with the neigbours over the exact position of the dividing hedge. And any world building you do needs to reflect that.