We are constantly shown nutritional information on food packaging stating this food contains "x" amount of your guided daily amount. A linked to the values is here. How were these values calculated? How do we know that men as a recommendation must not consume more than 2500 calories, 55g of protein 300g of carbohydrate etc...
The total calories are not in fact a recommended value - they are an example amount that is derived from some calorie intake that seemed reasonable to someone (I don't know the details). It does not mean that the government is recommending that you eat exactly 2000 calories per day.
The relative content is, however, a recommended value, based on presumably research. So, if you do take 2000 calories a day, then you know how much of it should be fat/carbs/proteins.
I think that there is some controversy about whether the recommended values were influenced by industry lobbying. Moreover, science is definitely not clear on what the optimal food content for a human is, which is why we keep having the different diet fads, oscillating from no-fat to no-carbs.
In the USA, they refer to this as the recommended daily values (DVs) for a variety of nutrients. All I can find regarding these recommendations is that they were calculated for adults and children over 4 years old with a daily energy intake of 2000 kilocalories (often referred to as calories in the US).