I experienced this sort of condescension all through medical school, and my experience is not unique. There is nothing more embarrassing, deflating, and discouraging than being made to feel like an idiot in front of your peers because you could not recall a piece of information, or because a question of yours was deemed too basic and simple for an expert to waste their time answering. That is how you stunt curiosity and instill destructive self-doubt. My most beloved teachers are those who exercised patience and did not treat any question as beneath them. I didn't take advantage of it. In fact, I was more motivated to learn and to return to discuss new ideas and concepts.
This reflects on a wider social view in which coming across as ignorant or not knowing the answer to a question is perceived as a sign of weakness. If you don't know something, you don't admit it and instead bullshit your way to perceived expertise.
My point is, people who do this are a net negative to your growth and society at large. It's taken me a while to grow comfortable with not knowing a lot, and to accept that there is absolutely nothing wrong with it. When I encounter people like this, I view them as nothing more than assholes who are not worth interacting with, and move on to finding the answer I need. What saddens me is that there are many who are stopped dead on their path to learning.
/rant