Why did God love the world?

In fact, it is necessary to analyze the biblical context behind the statement in John 3:16, which informs us that God loved the world with such complete love that he sent Jesus