The reasoning they probably do is that they see the cause first which they think is playing basketball and then they believe that causes the effect, which is that the players grow taller from it. As the famous quote goes, “one should be intelligence to recognize the difference between correlation and causation”. So the questioner is making a case of causation in this case where it is really a correlation, or even the reverse correlation.
More like the case is that people are tall first and that is the cause. The effect is that people and basketball coaches approach them (and sometimes hound them like with the story of 7′ 4″ Mark Eaton) about whether they play basketball that they eventually give in to the peer pressure and join in to try out basketball. Once they realize that their height is a huge advantage in the game and they find that they are relatively athletic and can play the game, they decide to continue to play and end up in basketball. Just look at the unique case of 7′ 9″ Sun Ming Ming. Because of his amazing height, he was given a chance by the NBA at the age of 27 with no prior basketball experience to work out and try out to make it to the NBA.
There has been a few theories going around that the intense anareobic movement and jumping involved in basketball allows the pituitary gland release more growth hormone into one’s system than being only sedentary. That is absolutely true, and I would guess that if one started to play basketball at a young enough age where the growth plates have not fused, one would be say 1 inch taller than if one did not play basketball or exercise at all. So yes, in this special case of where one exercises, there will be a slight increase in the overal maximum height when one still is growing.
The other main theory that people try to use to explain the causality of basketball and growing taller is that the constantly jumping involve in basketball causes the shinbones in the lower legs to develop microfractures. The microfractures can then heal itself , making the bones harder, thicken and longer. That is a good theory too but one has to remember that any none thickening of bone done from body healing will be in the horizontal direction so the bone will get thicker, not longer. The microfractures may exist but they are not numerous enough to create the type of porosity needed to actually push the outer edges of the fractures out by the longitudal direction.
In conclusion, please understand that the factor of playing basketball, and being tall is not a causal effect. Most of the time, people playing because they are tall, not that they play basketball to become tall.