As a police officer, you are explicitly told and trained to try to shoot at the body part that's easiest to hit in a stressful/dangerous situation - which would be the torso - and not try to aim at other parts that are much easier to miss. Plus, like Trollhammer said, there is no guarantee that a shot in the leg will actually take the attacker down. In situations where an attacker might come at you with a knife, you don't take unnecessary risks.
And no, this is not only happening in the US. Just last year, for example, a police officer in Austria shot someone who threatened them with a knife.