Jesus teaches in John 7:7 that the world hates him because he does not conform to the value system of the world, but instead testifies against it, calling it evil. This was already taught earlier in John 3:19 This is the judgment, that the Light has come into the world, and men loved the darkness rather than the Light, for their deeds were evil. 20 For everyone who does evil hates the Light, and does not come to the Light for fear that his deeds will be exposed. 21 But he who practices the truth comes to the Light, so that his deeds may be manifested as having been wrought in God.”
It’s one thing to teach about God’s love or the kingdom or the blessings of the Holy Spirit, but it’s quite another thing to directly confront someone’s sin. If God is not softening the heart of the recipient, it’s likely there will be some animosity spewing forth. It’s because of this response that many versions of Christianity have been developed that fit right in with the world’s value system.
Many people who seek out Christianity say: “I value health or wealth, or emotional wholeness, or full acceptance just the way I am or guilt-free living.” That corresponds to the world’s value system, so if we come with a message that highlights any or all of those things, then it will be fully accepted. However, if our message entails repenting from the sin of making those things top priorities in order to make Christ THE top priority, then we will incur hostility at times because the human heart naturally loves sin and will not part with it until the Spirit shines the light of the gospel in the heart and puts forth Christ as the only acceptable sacrifice to escape the just judgment of one’s sin.
The point Jesus is making in vv.6-7 is that his brothers were unbelievers and therefore their belief system was acceptable to the world. Thus they could go interact with the world with no consequence, but it was not yet Jesus’ hour (vv.6, 8).