If G-d knew that people would sin, why did He create humanity and later grieve?
The quoted commentary of Rashi explains that G-d created humanity for the sake of the righteous people who would eventually arise. Rabbi Yehoshua ben Korcha explains joy and grief through the example of a father who rejoices at his son's birth despite knowing that his son will not live forever. Knowledge of the future does not remove the appropriateness of joy in its time and mourning in its time.
Quote from the source«At a time of mourning, mourning is appropriate.»
- Author
- Rabbi Yehoshua ben Korcha; Rashi
- Source
- Beis Moshiach - English — 479, p. 4