Some find a moral conundrum in this passage. How could Jesus say definitively that He wasn’t going, then turn around and go? Well, there is a variant reading that may shed some light on the passage. The vast majority of manuscripts say, “I am not yet going” (7:8). I believe that properly summarizes the intent here. Jesus is saying, “You can go up the feast now because no-one is trying to kill you. I’m not going up yet. I’ll come later.”
The fact that His brothers didn’t believe in Him (7:5) explains the tone of their comments. They are trying to goad Him into going to the feast!
When Jesus does go, He teaches in the temple courts. The Jewish leaders are astonished at Him because He hasn’t had any formal teaching. Jesus points out that He’s merely teaching about God and seeking God’s glory, which they would understand if they really knew God! And if they truly knew God, they wouldn’t want to kill Him! Either they deny it or the crowd doesn’t fully understand, so Jesus explains Himself. It goes back to His healing of a man on the Sabbath. The religious authorities are willing to break the Sabbath command in order for a child to be circumcised, so how can anyone be upset when Jesus makes a man well? They don’t understand because they are judging superficially, without taking into account why Jesus did what He did when He did it.
How about us? Are we quick to judge others, rather than trying to understand their motivations? Do we lack compassion like the religious leadership in Jesus’ day? Or perhaps we do the same thing with the Bible, taking a command out of context without trying to understand how to apply it properly.