The rules for eligibility for the draft varies depending on the league.  If a league allows 18 year olds to be drafted, like the NBA used to, then it's a matter of some team thinking that the player in question is good enough to be drafted.\n\nIn short, high school players get drafted because league rules allow it, and some team thinks that the player is worth drafting.