For this joke to logically work, logicians must be weird people who always know whether they want a beer or not. Because if it happened that the first guy just hadn't made his mind up yet, then the third guy's conclusion could be wrong.
They all had made up their mind. You don't need to know the others decision to answer No to the question, but you do to say yes. If the first didn't want a beer they could definitively answer no. They did, but didn't know the others decisions so couldn't say yes. Same with the 2nd. The third could say yes because he knew the other two didn't say no, so whatever they wanted was the answer
OCs point was that if the first person hadn't made up their mind yet, that would also cause them to say "i don't know", but the two following logicians seem to assume that the first person said "i don't know" because they wanted it but didn't know if the other two did
It's a false dichotomy and faulty logic if you look too closely
If any logician hadn't made up his mind, then the answer to "do all of you want a beer" would be False, i. e. No.
The idea that a Yes/No question can have any other state is not possible for these cartoonish logicians.
(Of course, "logicians" do not exist. The closest thing in real life are mathematicians and computer scientists who are trained in logic, and these people known that the real world works differently than the simple logic presented in this joke, so your point is valid at some level, but it doesn't invalidate the joke)
First guy knows he wants a beer, but doesn't know if the others do, so says he doesn't know if all three do. However, if he had not wanted a beer, he would have known that not all three wanted one, and therefore would have said no. Which means the second guy then knows that the first guy wants a beer, but does not know if the third does. So he says he doesn't know. That gives the third guy, who also wants a beer, with enough information to say that all three want a beer
none of them would go to a bar if they didn't mean to consume some drink -- therefore we can assume all of them knew whether they wanted a beer or not.