This is purely anecdotal, but in my area, all the local libraries carried the B/X boxed sets for at least a few years. None of them ever carried AD&D. Potentially, that's a lot of additional exposure outside of hobby/game stores. I never bought a 1E PHB, MM, or DMG during the 80's because my older brother had them and he left them at home when he went away to college. It's only been in the last few years that I've gone back and bought the original 3 books. I learned about D&D from my brother. If he hadn't played I likely wouldn't have known about it until it showed up at the library (our K-8 school was right across the street so trips to the library were a weekly occurrence). It's also where I stumbled across the Fighting Fantasy gamebooks. The only real advertisement for (A)D&D (at least in the US) was in magazines like 'The Dragon', but the only people who knew about 'The Dragon' were usually the (A)D&D players.
Also, when parents bought the game for their kids, it was most likely to be the B/X game as that showed up in the bigger box stores every now and then while Advanced never did that I saw. For me, the 80's had more competition for my time than the 90's did. In the early 80's, Top Secret got more play time than either B/X or Advanced. In the 90's though, there was less competition for D&D than there was in the 80's. In the early part of the decade (when I was in college) the only real competition was Call of Cthulhu and a little GURP's. As a result, I bought tons of D&D 2E stuff, even though I liked it less, because far fewer games caught my eye.
It's different now with the Internet and everyone having access to everything but it sure wasn't like that in the 80's and even for most of the 90's. For example, I never even saw a single Chaosium product until I went away to college; they were just never stocked in my area. The same for FGU. You couldn't buy what wasn't available.
Sales numbers are interesting but they don't always mean much. Also, it's not an "either or" situation. Heck, I know people who bought both B/X and Advanced and never played either. They felt that B/X was too "kiddified" but bounced hard off Gygax's writing style and wargame-isms in Advanced. Conversely, you had people who bought both and used both; keeping the stuff they liked, ignoring the rest, and making stuff up as they went. That kind of freeform play seems less common now (to me anyway) but was very common back then - even in "official" tournaments and the RPGA.