The specific example you posted is technically a riddle:
A riddle is a statement or question or phrase having a double or veiled meaning, put forth as a puzzle to be solved.
That doesn't really answer the more generic question in your title, however. Nor does it address your friend's assertion that all questions are valid. Strictly speaking, not all questions are valid:
What grik plah mot?
This is completely nonsensical regardless of it being phrased as a question. Even restricting oneself to valid English words it is possible to construct invalid questions:
What does the color 9 smell like?
These forms of questions can be described as fallacious. There is an entire list of appropriate fallacies but the most common in terms of questions would be:
- false dilemma — presenting two options as if they are the only choices available
- loaded question — asking a question such that any answer would be false or misleading
- false assumption — beginning your question with an assumption or assertion that is untrue
- non sequitur — asking a question such that the question makes no sense given the description of the scenario
The $1 riddle is an example of a non sequitur. The logic within the puzzle does not flow properly and the question at the end does not follow from the given scenario. Here is Wikipedia's description of the fallacy:
The term is often used in everyday speech and reasoning to describe a statement in which premise and conclusion are totally unrelated but which is used as if they were.
Their article more directly addresses the form related to formal logic but the principle holds. Here is the (slightly trimmed) riddle with the non sequitur highlighted:
Three guys split the cost of $30. They each kick in $10. The manager tells the clerk the room is only $25. He hands five $1 bills to the clerk and tells him to refund the money. The bell hop says to himself, "No way can three guys split $5, I'm going to help out." He stuffs $2 in his pocket, knocks on the door, gives each guy back a buck. So now each guy has paid $9. $9 times 3 is $27 plus $2 the bell hop stole--only $29! Where is the other buck?
Asking where the other buck is has nothing to do with the exchanges that happened earlier in the question.
By the way, as Martha pointed out in the comments, the correct action would have been to subtract the bellhop's $2 which arrives at $25, which is the cost of the room.
The Chicago Manual of Style, Fifteenth Edition (2003) terms requests or instructions of the type you seem to be talking about "courtesy questions" and considers them to be so unlike normal questions that it says they don't require question marks:
6.74 Courtesy question. A request courteously disguised as a question does not require a question mark.
[Example:] Would you kindly respond by March 1.
[Example:] Will the audience please rise.
Best Answer
A "rhetorical" question is a question which is asked to make a point rather than get a correct answer or remark. For example, if someone you knew failed their test without trying at all, you would say:
The question does not require an answer, it was asked to make the student think about his responsibility as a learner.
When you really mean to ask why they're out, is not rhetorical, because you're asking a question without expecting a normal answer. That is different from asking a question which does not require an answer, hence it can be considered incorrect.
A rhetorical question must not be used for casual talk, inquiry or gathering information(Unless absolutely required). Rhetorical questions are better used while debating, in persuasive speeches, when you need to get your point forward to another person.