Well right off the bat, let me say that the signs are legally irrelevant. Restaurants that do or do not have the signs have the same rights, regardless of whether they telegraph that to their costumers. As an analogy, homes without "No Trespassing" signs have just as much right to call the cops on trespassers. The main purpose of the signs is not to reserve any rights, but to give owners something to point to when unruly customers don't want to leave.
In the United States, very few rights are explicitly laid out and protected. So if you're asking if there's a specific law or statute saying "Businesses can deny customers," the answer is that it doesn't exist. Basically, the "right" to refuse customers exists for the same reason that the right to smoke cigarettes exists: because there are no laws against doing so. I guess if you want to get philosophical, the right to refuse service is an extension of the restaurant's right to property, and its right to control that property. A restaurant that is legally required to sell its products away doesn't "own" its products or facilities in any meaningful way.
But like smoking cigarettes, the right to refuse service in the United States is not absolute and can be infringed upon by legislatures with good reason. The Civil Rights Act of 1964 forbids public accommodations such as restaurants from discriminating based on race, color, religion, sex or national origin. Later federal legislation added protections for disability, age, pregnancy, and veteran status. Additional protected classes vary by state. In particular, many states add sexuality or gender identity to the list, and California's proscription of discrimination based on "personal attributes" covers basically anything a clever attorney can dream of.
How much of this applies in other countries, I'm not sure. But I'm skeptical that there would be a country where businesses are legally required to seat even unruly customers.