Impact of Grades

I am trying to understand if I have this correct. You got a D in a US History class. Therefore you are taking far more difficult world history classes in your junior and senior year.

Is this correct?

How is your high school letting you take IB history if your only D was in a history class? What happened that caused you to get a D? How are you going to do better in your future history classes?

I am wondering whether it is a good idea to take IB history classes. I am also wondering if I am just misunderstanding this.