First of all, it's not a contradiction at all. All the medical facilities that needed them before, still need them now, unrelated to this. So it's completely possible for them to be needed for surgeons and doctors performing procedures but be ineffective for this virus. I'll try to find the source for it, but I believe I heard that these do nothing to prevent you from getting it, it only help prevent people who already have it from spreading it. Yes, buying them en mass definitely creates a shortage. I saw somewhere (I'll edit with link if I can find source in a bit) that medical facilities are asking manufacturers to fill their orders first as there is a shortage. Not sure why this concept doesn't make sense. Huge surge in demand typically means a decline in supply especially when manufacturers of said item may be in places that aren't operating due to the very reason these masks are being purchased to begin with.
ETA: Quick google search backs up pretty much all that info with multiple links, many quoting the CDC and WHO.
1. With a long incubation period, anyone can be infected and not know any it, wearing any mask helps.
2. The lack of testing in the US makes point 1 much more important.
3. Any mask helps prevent us from touching our face, which we do about 20-25x per hour on average.
4. No retail stores are getting any new stock. No distributors are getting new stock. Everything is on back order. Unless the CDC is shopping Walmart’s looking for the 2 masks remaining there’s absolutely no reason to get a hold of whatever you can find.