This is pretty much the crux of the matter. Weightlifting and Powerlifting are very narrow in focus and take an intense mental and physical focus/dedication over months and years to achieve a decent competitive level.
Despite the efforts of federations, they are not team sports. Even direct competition against another person is pretty much secondary compared to the lifter vs the bar.
In both sports (wl & pl) there is one person on the platform (yes, sometimes two platforms run concurrently but not in a competitive way, just to get through a large number of lifters) with one bar.
In crossfit, there are multiple athletes on the field and often multiple teams. This format appeals to the masses. It's easier to understand. It takes no effort so see who's "winning".
In crossfit there are not just two lifts (weightlifting) or just three lifts (powerlifting). In powerlifting, things get a bit boring after watching the first flight of squats go through, knowing that you got another hour of this coming.
In crossfit there is never a goal for a single max lift (as failing a lift usually happens at the end of a long set of singles).
In crossfit there are no set "must do" lifts. There are a huge variety of exercises that may (and usually do) change in every competition.
Crossfit also, and let me put this delicately, is a sausage and vag fest. Compare a field of crossfit athletes (shirtless, crop tops, bootahy shorts, six packs everywhere) to the unflattering spandex encased phatfuks in wl & pl. It's the equivalent to beach volleyball. Come on. No one watches women's volleyball to see skilled athletes in action. NO ONE!!!
It's the modern stadium based motocross compared to the old school "real mud and dirt out in a farmer's paddock" motocross. Sheeple don't like to think too much. Single athlete sports are too difficult to empathise with.