A lot of countries have laws like this but they are basically unenforceable I think. If you have Israeli and French citizenship, you just use two passports and don't bring it up to the French government?
Actually, if a country wants to enforce it, it enforces. Not perfectly, of course (which law is perfectly enforceable?) but it is doable. If you are caught, you can lose your citizenship - and with troublesome consequences for your past. So, citizens of countries in which such laws are typically enforced tend to follow them.
But I think both of us are in a wrong thread