The most likely reason the author includes the sentence "Sometimes, lessons must be learned the hard way" is:
D To show that students may not see value in the law until they are directly affected.
This sentence emphasizes that students may come to understand the law's importance only after experiencing the consequences of not adhering to it, which aligns with the context of the passage discussing the No Pass, No Play law and its impact on students.