"Which country are you from?"
Without 人, the Chinese question would mean "which country are you?" and it doesn't make sense.
中国 = China (a physical place)
中国人 = China person, Chinese (a person or people from China)
哪国 = which country ? ( a physical place)
哪国人 = a person or people from which country?
It's the same structure as it would be in a statement except the question word 哪 replaces the name of the country to make it a question.
你是中国人。= You are a person from China. / You are Chinese.
你是哪国人？= You are a person from which country?
Of course the more natural way to say it in English is "what/which country are you from?" English works differently as a language so you can't always expect translations to be word for word or structured the same.
Also, by using the verb 是, you are specifically asking about what a person "is" and not where they "come from." A person cannot literally be (是) a country or a physical place. If you used a different verb, such as 来自, then you wouldn't need to add 人 because it would be asking what place the person comes from.
你是中国人。= You are a Chinese person.
你来自中国。= You come from China.
(Just to clarify, this isn't me trying to be rude, I'm legitimately trying to help you understand.)
I think the reason for that was to make you mentally figure it out by yourself. That is the best way to learn- you won't learn how to speak fluently if every answer is given to you.
A lot of people here are wondering why 吗 is not used in this sentance. I think I can help.
In Chinese, there are multiple types of question words. 吗 refers to yes-no questions. (So if the question was "are you Chinese" then you would need to use 吗。”你是中国人吗?”)
In this case, you use the word 哪 meaning which. In Chinese, question words will often (but not always) take the place of their answers. Example: Q: 你是哪国人? A: 我是美国人。
Here are a few types of question words that are commonly used in Chinese:
吗(ma): Used to indicate that a statement is a yes or no question. Q: 你会说中文吗? A: 我会(说中文)
哪(nă): means which. It is often used to ask which kind of food you want or which location you hail from, but naturally it has numerous uses. Q: 你是哪国人? A: 我是中国人。
几(ji3): Used to indicate an unknown number of things, typically between 1 and 10. Q: 你几岁? (How old are you?) A: 我是七岁。(I am 7)
There are several types of question words, these are just a few basic ones.