Such an obvious question, but maybe not so obvious. The main explanation could be - countries authorities enforce online books to do so. But some books are so overzealous in it, that it is worth to research to understand it better.
Let us take Germany and Austria. In 2011, betfair exchange has restricted Germany, and it was a beginning of the great restriction orgy. A few years later betfair has also banned Austria.
Betdaq did the same in 2014 or 2015.
Matchbook did the same a few years later. (Matchbook is a restriction champion, but I could not find the official list of banned countries on their website. Maybe matchbook is ashamed =)
Pinnacle has left the german market in 2016. But Pinnacle still accepts accounts from Austria. Pinnacle is keeping the list of his banned countries up-to-date. These are all "big" european countries (Germany, France, Spain, UK, Italy and some others). But also Sudan, Syrien and North Korea. And especially weird - the Netherlands. Pinnacle has headquarter and is licensed in Curacao, which is a part of Netherlands. But you are not allowed to have a pinnacle account, if you live in Curacao or other part of the Netherlands! Actually, Pinnacle has also Malta license, which should enable to operate in the whole EU, but the most EU-countries are restricted.
Why are bookies so meticulous in restricting? Are they sometimes interested in it (if they, for example, register - germans are winning too much, better we bann the whole land)?
Another reason could be - some people claim the lost money back with an argument - it has been illegal betting. If the lawyers of some country can push it through, then it is understandable why the books restrict. Is all the suffering probably because of such unfair losers?