This could be looked at as a translation issue. The verse says, "Jacob I loved but Esau I hated", in the old English translation. Yet, Esau was made a great nation, as promised. What "hated" meant here was "rejected". God rejected Esau from the inheritance of Abraham and Isaac, the patriarchal fatherhood of Israel, the right to walk as "the friend of God" in his generation. It passed instead to Jacob, the worm, the supplanter.
God "rejects" those who do evil. They are scourged in the "fire of His anger" which is the purging discerment of His wisdom and love that "destroys" the works that are not wrought in His ways. Why? So that He may teach the wicked to do right, and bow before the glory of His love and righteousness.