If you look at hockey, it is mostly white. That doesn't mean being white gives you an advantage in playing hockey. It just means way more white people enjoy hockey compared to black people.
I suspect it's more that playing hockey implies a certain socioeconomic stratum (hockey is an expensive sport).
The sport is a VERY large time and finance drain on a family.
Rec-league hockey requires an ice rink and time on it. Ice rink time is highly demanded and you may be getting it at 6:00AM or 11:00PM. You also need to coordinate teams at those times. And if you want any practice time-you may be getting that at 3:00AM in the morning (not joking).
And, for all of that, you get the joy of shelling out lots of money for the privilege of using the ice on the graveyard shift.
Practically every high school and elementary school has a basketball court--that's probably 10,000+ in Canada. It doesn't count any associated with public parks, etc.
Contrast that with ice rinks which are probably about 1000. You have at least a factor of 10 differential--probably more. In addition, ice rinks are vastly higher outlay to keep running.
So, that means real money to use the rink when using a basketball court is, at worst, a nominal fee. Longer travel to play against another team if you're in a league. Fewer coaches which need to be paid more. And, your practice times are in the "dead zones" from 11:00PM to 6:00AM in the morning as the ice rink is looking to make real money from 3:00PM to about 11:00PM.