It's a conformity test, though it's not often viewed that way. If you interview enough you get really good at passing them, surprisingly quickly. Ultimately they want to hire people that fit a certain mold, because they understand how to utilize them. It is only a red flag if you aren't that type of person, or don't enjoy pretending to be one.
IMHO it is also the reason they can't generally make their own (good) products any more, without acquiring / copying -- that is not the type of people they hire (more artistic / risk taker types).
The point of the question is to see your problem solving skills, not if you have your 2s memorized. Anyone with basic math skills should be able to arrive at the answer.
My answer would have been the same. When asked to work it out, I would have pointed out that I simply wouldn't; not because I don't know how, but because if I need to know the number of bits it takes to store such a specific number, there is probably a reason. That reason could be storage of some form, such as wire protocols or files, and I don't want to fuck it up because I miss a step or misremember something. So, no, I won't even bother memorizing it, let alone, calculate it by hand.
It seems like you aren't capable of differientating between an interview and real work. This isn't an exercise to see if you can figure out how many bits it takes to store a number. It is a test to see how you approach a problem, if you can break it down (2^10 = 1024, 2^10*2^10 = 2^20 = 1m), and arrive at a solution. It's a simple problem that doesn't require you to be a math wizard.
And part of a real job involves solving real problems. In an interview, you have a very limited time, so you have to come up with questions that test the candidate's ability to solve problems within a certain timeframe.
Except the problem is (which I didn't state but pointed out) is that this isn't really a "problem." It's just math. That's it. If you want to know if I know how to multiply two numbers together, you might as well just ask me if I know what 2*2 is and move on to the next question.
It is a gotcha question. In fact, "log2 of 56 million" should probably be the best answer. It means you don't waste time brute forcing the problem and instead know exactly how to get the solution, but they wanted a specific answer that you compute by some heuristic. Why?
Either way, if a candidate misses such a question it shouldn't be a negative. Using such a question as a filter is a bit ridiculous.
It's still good to do well at interviewing even for jobs that aren't the best fit for you, because whether you want to take those jobs or not, it will help you when negotiating for the job you really want to have those other offers in hand.
IMHO it is also the reason they can't generally make their own (good) products any more, without acquiring / copying -- that is not the type of people they hire (more artistic / risk taker types).