But we do introduce the game of basketball to students in phys ed. Some students won't have been exposed to it until then, and maybe it's a thing they like to do. We introduce a lot of different physical activities in phys ed class. That's what it's for!
You're not going to write a AAA game or whatever in hour-of-code class, but you're not going to do nothing but dunk in 40minutes of basketball class, either. In both cases you're going to go over just enough of the basics to hopefully have 5-10 minutes at the end to do something fun.