Painting establishes a relation between the painter and static entities (subject, colors...). They interact in many ways, however the painter is the main 'motor' and 'will'.
Basketball is different because a player interacts with his teammates and opponents, he isn't the sole will at play. However I can see how experience may lead a coach to reckon that some individual ways (types of actions or reactions) are statistically better than other ones, either because their intrinsic rate of success is higher or because they benefit from teamwork, leading him to drill them in order to have them select the best ones and apply them properly. It may create a "team of robots" (sort of!) which may be crushed by an opponent team playing in a deliberately unusual (albeit not absurd) way, established to counter the particular automatic actions and reactions of the "robot team".
Individual sports are different because there is no teamwork. Combat sports are particularly interesting because you need to scrim (spar) not simply to verify the effects of drills but in order to learn what no drill can effectively teach you: a certain mental state, coping with stress, simultaneously integrating many dynamic blurry variables (related to time & space)...
Drill, barely spar and only use it to check what you gained from drills, then hop on a ring against a person who spared properly... and good luck to you (you will need it)!